mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-12 17:27:52 -06:00
Removed unused variables
This commit is contained in:
parent
32f5538e0d
commit
d62f33b0b4
6 changed files with 8 additions and 12 deletions
|
@ -69,7 +69,7 @@ stl_count_facets(stl_file *stl, char *file) {
|
||||||
long file_size;
|
long file_size;
|
||||||
int header_num_facets;
|
int header_num_facets;
|
||||||
int num_facets;
|
int num_facets;
|
||||||
int i, j;
|
int i;
|
||||||
size_t s;
|
size_t s;
|
||||||
unsigned char chtest[128];
|
unsigned char chtest[128];
|
||||||
int num_lines = 1;
|
int num_lines = 1;
|
||||||
|
|
|
@ -293,8 +293,8 @@ BridgeDetector::unsupported_edges(double angle, Polylines* unsupported) const
|
||||||
TODO: angle tolerance should probably be based on segment length and flow width,
|
TODO: angle tolerance should probably be based on segment length and flow width,
|
||||||
so that we build supports whenever there's a chance that at least one or two bridge
|
so that we build supports whenever there's a chance that at least one or two bridge
|
||||||
extrusions would be anchored within such length (i.e. a slightly non-parallel bridging
|
extrusions would be anchored within such length (i.e. a slightly non-parallel bridging
|
||||||
direction might still benefit from anchors if long enough) */
|
direction might still benefit from anchors if long enough)
|
||||||
double angle_tolerance = PI / 180.0 * 5.0;
|
double angle_tolerance = PI / 180.0 * 5.0; */
|
||||||
for (Polylines::const_iterator polyline = _unsupported.begin(); polyline != _unsupported.end(); ++polyline) {
|
for (Polylines::const_iterator polyline = _unsupported.begin(); polyline != _unsupported.end(); ++polyline) {
|
||||||
Lines lines = polyline->lines();
|
Lines lines = polyline->lines();
|
||||||
for (Lines::const_iterator line = lines.begin(); line != lines.end(); ++line) {
|
for (Lines::const_iterator line = lines.begin(); line != lines.end(); ++line) {
|
||||||
|
|
|
@ -435,7 +435,6 @@ GCode::extrude(ExtrusionLoop loop, std::string description, double speed)
|
||||||
|
|
||||||
// make a little move inwards before leaving loop
|
// make a little move inwards before leaving loop
|
||||||
if (paths.back().role == erExternalPerimeter && this->layer != NULL && this->config.perimeters > 1) {
|
if (paths.back().role == erExternalPerimeter && this->layer != NULL && this->config.perimeters > 1) {
|
||||||
Polyline &last_path_polyline = paths.back().polyline;
|
|
||||||
// detect angle between last and first segment
|
// detect angle between last and first segment
|
||||||
// the side depends on the original winding order of the polygon (left for contours, right for holes)
|
// the side depends on the original winding order of the polygon (left for contours, right for holes)
|
||||||
Point a = paths.front().polyline.points[1]; // second point
|
Point a = paths.front().polyline.points[1]; // second point
|
||||||
|
|
|
@ -162,12 +162,10 @@ Model::has_objects_with_no_instances() const
|
||||||
bool
|
bool
|
||||||
Model::add_default_instances()
|
Model::add_default_instances()
|
||||||
{
|
{
|
||||||
bool added = false;
|
|
||||||
// apply a default position to all objects not having one
|
// apply a default position to all objects not having one
|
||||||
for (ModelObjectPtrs::const_iterator o = this->objects.begin(); o != this->objects.end(); ++o) {
|
for (ModelObjectPtrs::const_iterator o = this->objects.begin(); o != this->objects.end(); ++o) {
|
||||||
if ((*o)->instances.empty()) {
|
if ((*o)->instances.empty()) {
|
||||||
(*o)->add_instance();
|
(*o)->add_instance();
|
||||||
added = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -127,13 +127,12 @@ MotionPlanner::shortest_path(const Point &from, const Point &to)
|
||||||
// Now check whether points are inside the environment.
|
// Now check whether points are inside the environment.
|
||||||
Point inner_from = from;
|
Point inner_from = from;
|
||||||
Point inner_to = to;
|
Point inner_to = to;
|
||||||
bool from_is_inside, to_is_inside;
|
|
||||||
|
if (!env.contains(from)) {
|
||||||
if (!(from_is_inside = env.contains(from))) {
|
|
||||||
// Find the closest inner point to start from.
|
// Find the closest inner point to start from.
|
||||||
inner_from = this->nearest_env_point(env, from, to);
|
inner_from = this->nearest_env_point(env, from, to);
|
||||||
}
|
}
|
||||||
if (!(to_is_inside = env.contains(to))) {
|
if (!env.contains(to)) {
|
||||||
// Find the closest inner point to start from.
|
// Find the closest inner point to start from.
|
||||||
inner_to = this->nearest_env_point(env, to, inner_from);
|
inner_to = this->nearest_env_point(env, to, inner_from);
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,7 +100,7 @@ TriangleMesh::repair() {
|
||||||
stl.stats.facets_w_3_bad_edge = (stl.stats.number_of_facets - stl.stats.connected_facets_1_edge);
|
stl.stats.facets_w_3_bad_edge = (stl.stats.number_of_facets - stl.stats.connected_facets_1_edge);
|
||||||
|
|
||||||
// checking nearby
|
// checking nearby
|
||||||
int last_edges_fixed = 0;
|
//int last_edges_fixed = 0;
|
||||||
float tolerance = stl.stats.shortest_edge;
|
float tolerance = stl.stats.shortest_edge;
|
||||||
float increment = stl.stats.bounding_diameter / 10000.0;
|
float increment = stl.stats.bounding_diameter / 10000.0;
|
||||||
int iterations = 2;
|
int iterations = 2;
|
||||||
|
@ -110,7 +110,7 @@ TriangleMesh::repair() {
|
||||||
//printf("Checking nearby. Tolerance= %f Iteration=%d of %d...", tolerance, i + 1, iterations);
|
//printf("Checking nearby. Tolerance= %f Iteration=%d of %d...", tolerance, i + 1, iterations);
|
||||||
stl_check_facets_nearby(&stl, tolerance);
|
stl_check_facets_nearby(&stl, tolerance);
|
||||||
//printf(" Fixed %d edges.\n", stl.stats.edges_fixed - last_edges_fixed);
|
//printf(" Fixed %d edges.\n", stl.stats.edges_fixed - last_edges_fixed);
|
||||||
last_edges_fixed = stl.stats.edges_fixed;
|
//last_edges_fixed = stl.stats.edges_fixed;
|
||||||
tolerance += increment;
|
tolerance += increment;
|
||||||
} else {
|
} else {
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue