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

#include <GCodeWriter.hpp>

Public Member Functions

 GCodeWriter ()
 
Extruderextruder () const
 
std::string extrusion_axis () const
 
void apply_print_config (const PrintConfig &print_config)
 
template<typename Iter >
void set_extruders (Iter begin, Iter end)
 
template<typename T >
void set_extruders (const std::vector< T > &extruder_ids)
 
template<typename T >
void set_extruders (const std::set< T > &extruder_ids)
 
std::string notes ()
 Write any notes provided by the user as comments in the gcode header. More...
 
std::string preamble ()
 Actually write the preamble information. More...
 
std::string postamble () const
 
std::string set_temperature (unsigned int temperature, bool wait=false, int tool=-1) const
 
std::string set_bed_temperature (unsigned int temperature, bool wait=false) const
 
std::string set_fan (unsigned int speed, bool dont_save=false)
 
std::string set_acceleration (unsigned int acceleration)
 
std::string reset_e (bool force=false)
 
std::string update_progress (unsigned int num, unsigned int tot, bool allow_100=false) const
 
bool need_toolchange (unsigned int extruder_id) const
 
std::string set_extruder (unsigned int extruder_id)
 
std::string toolchange (unsigned int extruder_id)
 
std::string set_speed (double F, const std::string &comment=std::string(), const std::string &cooling_marker=std::string()) const
 
std::string travel_to_xy (const Pointf &point, const std::string &comment=std::string())
 
std::string travel_to_xyz (const Pointf3 &point, const std::string &comment=std::string())
 
std::string travel_to_z (double z, const std::string &comment=std::string())
 
bool will_move_z (double z) const
 
std::string extrude_to_xy (const Pointf &point, double dE, const std::string &comment=std::string())
 
std::string extrude_to_xyz (const Pointf3 &point, double dE, const std::string &comment=std::string())
 
std::string retract ()
 
std::string retract_for_toolchange ()
 
std::string unretract ()
 
std::string lift ()
 
std::string unlift ()
 
Pointf3 get_position () const
 

Public Attributes

GCodeConfig config
 
std::map< unsigned int, Extruderextruders
 
bool multiple_extruders
 

Constructor & Destructor Documentation

◆ GCodeWriter()

Slic3r::GCodeWriter::GCodeWriter ( )
inline

Member Function Documentation

◆ apply_print_config()

void Slic3r::GCodeWriter::apply_print_config ( const PrintConfig print_config)

◆ extrude_to_xy()

std::string Slic3r::GCodeWriter::extrude_to_xy ( const Pointf point,
double  dE,
const std::string &  comment = std::string() 
)

◆ extrude_to_xyz()

std::string Slic3r::GCodeWriter::extrude_to_xyz ( const Pointf3 point,
double  dE,
const std::string &  comment = std::string() 
)

◆ extruder()

Extruder* Slic3r::GCodeWriter::extruder ( ) const
inline

◆ extrusion_axis()

std::string Slic3r::GCodeWriter::extrusion_axis ( ) const
inline

◆ get_position()

Pointf3 Slic3r::GCodeWriter::get_position ( ) const
inline

◆ lift()

std::string Slic3r::GCodeWriter::lift ( )

◆ need_toolchange()

bool Slic3r::GCodeWriter::need_toolchange ( unsigned int  extruder_id) const

◆ notes()

std::string Slic3r::GCodeWriter::notes ( )

Write any notes provided by the user as comments in the gcode header.

◆ postamble()

std::string Slic3r::GCodeWriter::postamble ( ) const

◆ preamble()

std::string Slic3r::GCodeWriter::preamble ( )

Actually write the preamble information.

◆ reset_e()

std::string Slic3r::GCodeWriter::reset_e ( bool  force = false)

◆ retract()

std::string Slic3r::GCodeWriter::retract ( )

◆ retract_for_toolchange()

std::string Slic3r::GCodeWriter::retract_for_toolchange ( )

◆ set_acceleration()

std::string Slic3r::GCodeWriter::set_acceleration ( unsigned int  acceleration)

◆ set_bed_temperature()

std::string Slic3r::GCodeWriter::set_bed_temperature ( unsigned int  temperature,
bool  wait = false 
) const

◆ set_extruder()

std::string Slic3r::GCodeWriter::set_extruder ( unsigned int  extruder_id)

◆ set_extruders() [1/3]

template<typename Iter >
void Slic3r::GCodeWriter::set_extruders ( Iter  begin,
Iter  end 
)
inline

◆ set_extruders() [2/3]

template<typename T >
void Slic3r::GCodeWriter::set_extruders ( const std::vector< T > &  extruder_ids)
inline

◆ set_extruders() [3/3]

template<typename T >
void Slic3r::GCodeWriter::set_extruders ( const std::set< T > &  extruder_ids)
inline

◆ set_fan()

std::string Slic3r::GCodeWriter::set_fan ( unsigned int  speed,
bool  dont_save = false 
)

◆ set_speed()

std::string Slic3r::GCodeWriter::set_speed ( double  F,
const std::string &  comment = std::string(),
const std::string &  cooling_marker = std::string() 
) const

◆ set_temperature()

std::string Slic3r::GCodeWriter::set_temperature ( unsigned int  temperature,
bool  wait = false,
int  tool = -1 
) const

◆ toolchange()

std::string Slic3r::GCodeWriter::toolchange ( unsigned int  extruder_id)

◆ travel_to_xy()

std::string Slic3r::GCodeWriter::travel_to_xy ( const Pointf point,
const std::string &  comment = std::string() 
)

◆ travel_to_xyz()

std::string Slic3r::GCodeWriter::travel_to_xyz ( const Pointf3 point,
const std::string &  comment = std::string() 
)

◆ travel_to_z()

std::string Slic3r::GCodeWriter::travel_to_z ( double  z,
const std::string &  comment = std::string() 
)

◆ unlift()

std::string Slic3r::GCodeWriter::unlift ( )

◆ unretract()

std::string Slic3r::GCodeWriter::unretract ( )

◆ update_progress()

std::string Slic3r::GCodeWriter::update_progress ( unsigned int  num,
unsigned int  tot,
bool  allow_100 = false 
) const

◆ will_move_z()

bool Slic3r::GCodeWriter::will_move_z ( double  z) const

Member Data Documentation

◆ config

GCodeConfig Slic3r::GCodeWriter::config

◆ extruders

std::map<unsigned int,Extruder> Slic3r::GCodeWriter::extruders

◆ multiple_extruders

bool Slic3r::GCodeWriter::multiple_extruders

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