libslic3r
Library for generating gcode from 3d models
Public Member Functions | Public Attributes | List of all members
Slic3r::Print Class Reference

#include <Print.hpp>

Public Member Functions

 Print ()
 
 ~Print ()
 
void clear_objects ()
 
PrintObjectget_object (size_t idx)
 
const PrintObjectget_object (size_t idx) const
 
void delete_object (size_t idx)
 
void reload_object (size_t idx)
 
bool reload_model_instances ()
 
PrintRegionget_region (size_t idx)
 
const PrintRegionget_region (size_t idx) const
 
PrintRegionadd_region ()
 
void process ()
 Triggers the rest of the print process. More...
 
void export_gcode (std::ostream &output, bool quiet=false)
 Performs a gcode export. More...
 
void export_gcode (const std::string &filename, bool quiet=false)
 Performs a gcode export and then runs post-processing scripts (if any) More...
 
std::string export_gcode (bool quiet=false)
 commands a gcode export to a temporary file and return its name More...
 
bool invalidate_state_by_config (const PrintConfigBase &config)
 
bool invalidate_step (PrintStep step)
 
bool invalidate_all_steps ()
 
bool step_done (PrintObjectStep step) const
 
void add_model_object (ModelObject *model_object, int idx=-1)
 
bool apply_config (config_ptr config)
 Apply a provided configuration to the internal copy. More...
 
bool apply_config (DynamicPrintConfig config)
 
bool has_infinite_skirt () const
 
bool has_skirt () const
 
std::string validate () const
 
BoundingBox bounding_box () const
 
BoundingBox total_bounding_box () const
 
double skirt_first_layer_height () const
 
Flow brim_flow () const
 
Flow skirt_flow () const
 
void _make_brim ()
 
void make_skirt ()
 
void make_brim ()
 Generates a brim around all of the objects in the print. More...
 
std::set< size_t > object_extruders () const
 
std::set< size_t > support_material_extruders () const
 
std::set< size_t > extruders () const
 
size_t brim_extruder () const
 
void _simplify_slices (double distance)
 
double max_allowed_layer_height () const
 
bool has_support_material () const
 
void auto_assign_extruders (ModelObject *model_object) const
 
std::string output_filename ()
 
std::string output_filepath (const std::string &path)
 

Public Attributes

PrintConfig config
 
PrintObjectConfig default_object_config
 
PrintRegionConfig default_region_config
 
PrintObjectPtrs objects
 
PrintRegionPtrs regions
 
PlaceholderParser placeholder_parser
 
std::function< void(int, const std::string &)> status_cb {nullptr}
 
std::function< void(std::vector< std::string >)> post_process_cb {nullptr}
 
double total_used_filament
 
double total_extruded_volume
 
double total_cost
 
double total_weight
 
std::map< size_t, float > filament_stats
 
PrintState< PrintStepstate
 
ExtrusionEntityCollection skirt
 
ExtrusionEntityCollection brim
 

Constructor & Destructor Documentation

◆ Print()

Slic3r::Print::Print ( )

◆ ~Print()

Slic3r::Print::~Print ( )

Member Function Documentation

◆ _make_brim()

void Slic3r::Print::_make_brim ( )

◆ _simplify_slices()

void Slic3r::Print::_simplify_slices ( double  distance)

◆ add_model_object()

void Slic3r::Print::add_model_object ( ModelObject model_object,
int  idx = -1 
)

◆ add_region()

PrintRegion * Slic3r::Print::add_region ( )

◆ apply_config() [1/2]

bool Slic3r::Print::apply_config ( config_ptr  config)

Apply a provided configuration to the internal copy.

◆ apply_config() [2/2]

bool Slic3r::Print::apply_config ( DynamicPrintConfig  config)

◆ auto_assign_extruders()

void Slic3r::Print::auto_assign_extruders ( ModelObject model_object) const

◆ bounding_box()

BoundingBox Slic3r::Print::bounding_box ( ) const

◆ brim_extruder()

size_t Slic3r::Print::brim_extruder ( ) const

◆ brim_flow()

Flow Slic3r::Print::brim_flow ( ) const

◆ clear_objects()

void Slic3r::Print::clear_objects ( )

◆ delete_object()

void Slic3r::Print::delete_object ( size_t  idx)

◆ export_gcode() [1/3]

void Slic3r::Print::export_gcode ( std::ostream &  output,
bool  quiet = false 
)

Performs a gcode export.

◆ export_gcode() [2/3]

void Slic3r::Print::export_gcode ( const std::string &  filename,
bool  quiet = false 
)

Performs a gcode export and then runs post-processing scripts (if any)

◆ export_gcode() [3/3]

std::string Slic3r::Print::export_gcode ( bool  quiet = false)

commands a gcode export to a temporary file and return its name

◆ extruders()

std::set< size_t > Slic3r::Print::extruders ( ) const

◆ get_object() [1/2]

PrintObject* Slic3r::Print::get_object ( size_t  idx)
inline

◆ get_object() [2/2]

const PrintObject* Slic3r::Print::get_object ( size_t  idx) const
inline

◆ get_region() [1/2]

PrintRegion* Slic3r::Print::get_region ( size_t  idx)
inline

◆ get_region() [2/2]

const PrintRegion* Slic3r::Print::get_region ( size_t  idx) const
inline

◆ has_infinite_skirt()

bool Slic3r::Print::has_infinite_skirt ( ) const

◆ has_skirt()

bool Slic3r::Print::has_skirt ( ) const

◆ has_support_material()

bool Slic3r::Print::has_support_material ( ) const

◆ invalidate_all_steps()

bool Slic3r::Print::invalidate_all_steps ( )

◆ invalidate_state_by_config()

bool Slic3r::Print::invalidate_state_by_config ( const PrintConfigBase config)

◆ invalidate_step()

bool Slic3r::Print::invalidate_step ( PrintStep  step)

◆ make_brim()

void Slic3r::Print::make_brim ( )

Generates a brim around all of the objects in the print.

◆ make_skirt()

void Slic3r::Print::make_skirt ( )

Generates a skirt around the union of all of the objects in the print.

◆ max_allowed_layer_height()

double Slic3r::Print::max_allowed_layer_height ( ) const

◆ object_extruders()

std::set< size_t > Slic3r::Print::object_extruders ( ) const

◆ output_filename()

std::string Slic3r::Print::output_filename ( )

◆ output_filepath()

std::string Slic3r::Print::output_filepath ( const std::string &  path)

◆ process()

void Slic3r::Print::process ( )

Triggers the rest of the print process.

No need to call this as we call it as part of prepare_infill() until we fix the idempotency issue.

◆ reload_model_instances()

bool Slic3r::Print::reload_model_instances ( )

◆ reload_object()

void Slic3r::Print::reload_object ( size_t  idx)

◆ skirt_first_layer_height()

double Slic3r::Print::skirt_first_layer_height ( ) const

◆ skirt_flow()

Flow Slic3r::Print::skirt_flow ( ) const

◆ step_done()

bool Slic3r::Print::step_done ( PrintObjectStep  step) const

◆ support_material_extruders()

std::set< size_t > Slic3r::Print::support_material_extruders ( ) const

◆ total_bounding_box()

BoundingBox Slic3r::Print::total_bounding_box ( ) const

◆ validate()

std::string Slic3r::Print::validate ( ) const

Member Data Documentation

◆ brim

ExtrusionEntityCollection Slic3r::Print::brim

◆ config

PrintConfig Slic3r::Print::config

◆ default_object_config

PrintObjectConfig Slic3r::Print::default_object_config

◆ default_region_config

PrintRegionConfig Slic3r::Print::default_region_config

◆ filament_stats

std::map<size_t,float> Slic3r::Print::filament_stats

◆ objects

PrintObjectPtrs Slic3r::Print::objects

◆ placeholder_parser

PlaceholderParser Slic3r::Print::placeholder_parser

◆ post_process_cb

std::function<void(std::vector<std::string>)> Slic3r::Print::post_process_cb {nullptr}

Function pointer for the UI side to call post-processing scripts. Vector is assumed to be the executable script and all arguments.

◆ regions

PrintRegionPtrs Slic3r::Print::regions

◆ skirt

ExtrusionEntityCollection Slic3r::Print::skirt

◆ state

PrintState<PrintStep> Slic3r::Print::state

◆ status_cb

std::function<void(int, const std::string&)> Slic3r::Print::status_cb {nullptr}

◆ total_cost

double Slic3r::Print::total_cost

◆ total_extruded_volume

double Slic3r::Print::total_extruded_volume

◆ total_used_filament

double Slic3r::Print::total_used_filament

◆ total_weight

double Slic3r::Print::total_weight

The documentation for this class was generated from the following files: