OrcaSlicer latest
OrcaSlicer
Loading...
Searching...
No Matches
WipeTower.cpp File Reference
#include "WipeTower.hpp"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cmath>
#include <cstdlib>
#include <cstdio>
#include <iostream>
#include <map>
#include <string>
#include <utility>
#include <limits>
#include <math.h>
#include <unordered_map>
#include <unordered_set>
#include <vector>
#include <numeric>
#include <sstream>
#include <iomanip>
#include "libslic3r/Circle.hpp"
#include "libslic3r/ExtrusionEntity.hpp"
#include "libslic3r/ArcFitter.hpp"
#include "GCodeProcessor.hpp"
#include "BoundingBox.hpp"
#include "ClipperUtils.hpp"
#include "libslic3r/Line.hpp"
#include "LocalesUtils.hpp"
#include "libslic3r/GCodeWriter.hpp"
#include "libslic3r/PrintConfig.hpp"
#include "libslic3r/Polygon.hpp"
#include "libslic3r/Point.hpp"
#include "libslic3r/Polyline.hpp"
#include "libslic3r/MultiNozzleUtils.hpp"
#include "libslic3r/TriangleMesh.hpp"
#include "Triangulation.hpp"
#include "libslic3r/libslic3r.h"
#include "libslic3r/Config.hpp"
Include dependency graph for WipeTower.cpp:

Go to the source code of this file.

Classes

struct  Slic3r::Segment
struct  Slic3r::IntersectionInfo
struct  Slic3r::PointWithFlag
class  Slic3r::WipeTowerWriter

Namespaces

namespace  Slic3r
 |/ Copyright (c) Prusa Research 2020 - 2023 Enrico Turri @enricoturri1966 |/ |/ PrusaSlicer is released under the terms of the AGPLv3 or higher |/

Macros

#define WT_SIMPLIFY_TOLERANCE_SCALED   (0.001 / SCALING_FACTOR)
#define SCALED_WIPE_TOWER_RESOLUTION   (WIPE_TOWER_RESOLUTION / SCALING_FACTOR)

Enumerations

enum class  Slic3r::LimitFlow {
  Slic3r::None , Slic3r::LimitPrintFlow , Slic3r::LimitRammingFlow , Slic3r::LimitRammingFlowNC ,
  Slic3r::None , Slic3r::LimitPrintFlow , Slic3r::LimitRammingFlow
}

Functions

bool Slic3r::wipe_tower_sparse_layers_skipped (const PrintConfig &config)
bool Slic3r::wipe_tower_layer_is_sparse (const std::vector< WipeTower::ToolChangeResult > &layer_tool_changes)
std::vector< float > Slic3r::compute_compacted_wipe_tower_z (const std::vector< std::vector< WipeTower::ToolChangeResult > > &tool_changes, float base_z)
bool Slic3r::wipe_tower_sparse_layers_combined (const PrintConfig &config)
bool Slic3r::wipe_tower_layer_is_combined_away (const std::vector< WipeTower::ToolChangeResult > &layer_tool_changes)
std::vector< char > Slic3r::combine_sparse_wipe_tower_layers (std::vector< float > &layer_height, const std::vector< char > &layer_is_sparse, const std::vector< float > &max_layer_height, size_t first_layer_idx)
float Slic3r::align_round (float value, float base)
float Slic3r::align_ceil (float value, float base)
float Slic3r::align_floor (float value, float base)
template<class T>
static T Slic3r::at_or_front (const std::vector< T > &v, size_t i)
static bool Slic3r::is_valid_gcode (const std::string &gcode)
Polygon Slic3r::chamfer_polygon (Polygon &polygon, double chamfer_dis=2., double angle_tol=30./180. *PI)
Polygon Slic3r::rounding_rectangle (Polygon &polygon, double rounding=2., double angle_tol=30./180. *PI)
std::pair< bool, Vec2f > Slic3r::ray_intersetion_line (const Vec2f &a, const Vec2f &v1, const Vec2f &b, const Vec2f &c)
Polygon Slic3r::scale_polygon (const std::vector< Vec2f > &points)
std::vector< Vec2f > Slic3r::unscale_polygon (const Polygon &polygon)
Polygon Slic3r::generate_rectange (const Line &line, coord_t offset)
std::vector< Segment > Slic3r::remove_points_from_segment (const Segment &segment, const std::vector< Vec2f > &skip_points, double range)
IntersectionInfo Slic3r::move_point_along_polygon (const std::vector< Vec2f > &points, const Vec2f &startPoint, int startIdx, float offset, bool forward, int pair_idx)
void Slic3r::insert_points (std::vector< PointWithFlag > &pl, int idx, Vec2f pos, int pair_idx, bool is_forward)
Polygon Slic3r::add_extra_point (const Polygon &polygon, int scale_range)
Polylines Slic3r::remove_points_from_polygon (const Polygon &polygon_ori, const std::vector< Vec2f > &skip_points, double range, float wt_width, Polygon &insert_skip_pg)
Polylines Slic3r::construct_gap_for_skip_points (const Polygon &polygon, const std::vector< Vec2f > &skip_points, float wt_width, float gap_length, Polygon &insert_skip_polygon)
Polygon Slic3r::generate_rectange_polygon (const Vec2f &wt_box_min, const Vec2f &wt_box_max)
const char * Slic3r::flush_planner_queue_command (GCodeFlavor flavor)
std::string Slic3r::wait_command (GCodeFlavor flavor, float seconds)

Variables

float Slic3r::flat_iron_speed = 10.f * 60.f
static const double Slic3r::wipe_tower_wall_infill_overlap = 0.0
static constexpr double Slic3r::WIPE_TOWER_RESOLUTION = 0.1
static constexpr int Slic3r::arc_fit_size = 20
static const std::map< float, float > Slic3r::nozzle_diameter_to_nozzle_change_width {{0.2f, 0.5f}, {0.4f, 1.0f}, {0.6f, 1.2f}, {0.8f, 1.4f}}
const double Slic3r::wrapping_wipe_tower_depth = 10

Class Documentation

◆ Slic3r::IntersectionInfo

struct Slic3r::IntersectionInfo
Class Members
float dis_from_idx
int idx
bool is_forward
int pair_idx
Vec2f pos

◆ Slic3r::PointWithFlag

struct Slic3r::PointWithFlag
Class Members
bool is_forward
int pair_idx
Vec2f pos

Macro Definition Documentation

◆ SCALED_WIPE_TOWER_RESOLUTION

#define SCALED_WIPE_TOWER_RESOLUTION   (WIPE_TOWER_RESOLUTION / SCALING_FACTOR)

◆ WT_SIMPLIFY_TOLERANCE_SCALED

#define WT_SIMPLIFY_TOLERANCE_SCALED   (0.001 / SCALING_FACTOR)