Removed unused variables

This commit is contained in:
ntfshard 2015-08-24 00:35:11 +03:00 committed by Alessandro Ranellucci
parent 32f5538e0d
commit d62f33b0b4
6 changed files with 8 additions and 12 deletions

View file

@ -69,7 +69,7 @@ stl_count_facets(stl_file *stl, char *file) {
long file_size;
int header_num_facets;
int num_facets;
int i, j;
int i;
size_t s;
unsigned char chtest[128];
int num_lines = 1;

View file

@ -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,
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
direction might still benefit from anchors if long enough) */
double angle_tolerance = PI / 180.0 * 5.0;
direction might still benefit from anchors if long enough)
double angle_tolerance = PI / 180.0 * 5.0; */
for (Polylines::const_iterator polyline = _unsupported.begin(); polyline != _unsupported.end(); ++polyline) {
Lines lines = polyline->lines();
for (Lines::const_iterator line = lines.begin(); line != lines.end(); ++line) {

View file

@ -435,7 +435,6 @@ GCode::extrude(ExtrusionLoop loop, std::string description, double speed)
// make a little move inwards before leaving loop
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
// 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

View file

@ -162,12 +162,10 @@ Model::has_objects_with_no_instances() const
bool
Model::add_default_instances()
{
bool added = false;
// apply a default position to all objects not having one
for (ModelObjectPtrs::const_iterator o = this->objects.begin(); o != this->objects.end(); ++o) {
if ((*o)->instances.empty()) {
(*o)->add_instance();
added = true;
}
}
return true;

View file

@ -127,13 +127,12 @@ MotionPlanner::shortest_path(const Point &from, const Point &to)
// Now check whether points are inside the environment.
Point inner_from = from;
Point inner_to = to;
bool from_is_inside, to_is_inside;
if (!(from_is_inside = env.contains(from))) {
if (!env.contains(from)) {
// Find the closest inner point to start from.
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.
inner_to = this->nearest_env_point(env, to, inner_from);
}

View file

@ -100,7 +100,7 @@ TriangleMesh::repair() {
stl.stats.facets_w_3_bad_edge = (stl.stats.number_of_facets - stl.stats.connected_facets_1_edge);
// checking nearby
int last_edges_fixed = 0;
//int last_edges_fixed = 0;
float tolerance = stl.stats.shortest_edge;
float increment = stl.stats.bounding_diameter / 10000.0;
int iterations = 2;
@ -110,7 +110,7 @@ TriangleMesh::repair() {
//printf("Checking nearby. Tolerance= %f Iteration=%d of %d...", tolerance, i + 1, iterations);
stl_check_facets_nearby(&stl, tolerance);
//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;
} else {
break;