Prusa Slicer 2.6.0
Loading...
Searching...
No Matches
Slic3r::ExtrusionRole Struct Reference

#include <src/libslic3r/ExtrusionRole.hpp>

+ Inheritance diagram for Slic3r::ExtrusionRole:
+ Collaboration diagram for Slic3r::ExtrusionRole:

Public Member Functions

constexpr ExtrusionRole (const ExtrusionRoleModifier bit)
 
constexpr ExtrusionRole (const ExtrusionRoleModifiers bits)
 
bool is_perimeter () const
 
bool is_external_perimeter () const
 
bool is_infill () const
 
bool is_solid_infill () const
 
bool is_external () const
 
bool is_bridge () const
 
bool is_support () const
 
bool is_support_base () const
 
bool is_support_interface () const
 
bool is_mixed () const
 
constexpr enum_bitmask operator| (option_type t) const
 
constexpr enum_bitmask operator| (enum_bitmask< option_type > t) const
 
constexpr void operator|= (option_type t)
 
constexpr void operator|= (enum_bitmask< option_type > t)
 
constexpr bool operator& (option_type t) const
 
constexpr bool has (option_type t) const
 
constexpr bool operator== (const enum_bitmask r) const
 
constexpr bool operator!= (const enum_bitmask r) const
 
constexpr bool lower (const enum_bitmask r) const
 

Static Public Attributes

static constexpr const ExtrusionRoleModifiers None {}
 
static constexpr const ExtrusionRoleModifiers Perimeter { ExtrusionRoleModifier::Perimeter }
 
static constexpr const ExtrusionRoleModifiers ExternalPerimeter { ExtrusionRoleModifier::Perimeter | ExtrusionRoleModifier::External }
 
static constexpr const ExtrusionRoleModifiers OverhangPerimeter { ExtrusionRoleModifier::Perimeter | ExtrusionRoleModifier::Bridge }
 
static constexpr const ExtrusionRoleModifiers InternalInfill { ExtrusionRoleModifier::Infill }
 
static constexpr const ExtrusionRoleModifiers SolidInfill { ExtrusionRoleModifier::Infill | ExtrusionRoleModifier::Solid }
 
static constexpr const ExtrusionRoleModifiers TopSolidInfill { ExtrusionRoleModifier::Infill | ExtrusionRoleModifier::Solid | ExtrusionRoleModifier::External }
 
static constexpr const ExtrusionRoleModifiers Ironing { ExtrusionRoleModifier::Infill | ExtrusionRoleModifier::Solid | ExtrusionRoleModifier::Ironing | ExtrusionRoleModifier::External }
 
static constexpr const ExtrusionRoleModifiers BridgeInfill { ExtrusionRoleModifier::Infill | ExtrusionRoleModifier::Solid | ExtrusionRoleModifier::Bridge | ExtrusionRoleModifier::External }
 
static constexpr const ExtrusionRoleModifiers GapFill { ExtrusionRoleModifier::Thin }
 
static constexpr const ExtrusionRoleModifiers Skirt { ExtrusionRoleModifier::Skirt }
 
static constexpr const ExtrusionRoleModifiers SupportMaterial { ExtrusionRoleModifier::Support }
 
static constexpr const ExtrusionRoleModifiers SupportMaterialInterface { ExtrusionRoleModifier::Support | ExtrusionRoleModifier::External }
 
static constexpr const ExtrusionRoleModifiers WipeTower { ExtrusionRoleModifier::Wipe }
 
static constexpr const ExtrusionRoleModifiers Mixed { ExtrusionRoleModifier::Mixed }
 

Private Types

using underlying_type = typename std::underlying_type< option_type >::type
 

Static Private Member Functions

static constexpr underlying_type mask_value (option_type o)
 

Private Attributes

underlying_type m_bits = 0
 

Detailed Description

Member Typedef Documentation

◆ underlying_type

template<class option_type , typename = typename std::enable_if<std::is_enum<option_type>::value>::type>
using Slic3r::enum_bitmask< option_type, typename >::underlying_type = typename std::underlying_type<option_type>::type
privateinherited

Constructor & Destructor Documentation

◆ ExtrusionRole() [1/2]

constexpr Slic3r::ExtrusionRole::ExtrusionRole ( const ExtrusionRoleModifier  bit)
inlineconstexpr
enum_bitmask< ExtrusionRoleModifier > ExtrusionRoleModifiers
Definition ExtrusionRole.hpp:39

◆ ExtrusionRole() [2/2]

constexpr Slic3r::ExtrusionRole::ExtrusionRole ( const ExtrusionRoleModifiers  bits)
inlineconstexpr

Member Function Documentation

◆ has()

template<class option_type , typename = typename std::enable_if<std::is_enum<option_type>::value>::type>
constexpr bool Slic3r::enum_bitmask< option_type, typename >::has ( option_type  t) const
inlineconstexprinherited
47{ return m_bits & mask_value(t); }
underlying_type m_bits
Definition enum_bitmask.hpp:55
static constexpr underlying_type mask_value(option_type o)
Definition enum_bitmask.hpp:19

References Slic3r::enum_bitmask< option_type, typename >::m_bits, and Slic3r::enum_bitmask< option_type, typename >::mask_value().

Referenced by Slic3r::GUI::PrintHostSendDialog::PrintHostSendDialog(), Slic3r::ModelObject::cut(), is_bridge(), is_external(), is_infill(), is_mixed(), is_perimeter(), is_solid_infill(), is_support(), Slic3r::PresetBundle::load_configbundle(), Slic3r::ModelObject::process_connector_cut(), Slic3r::ModelObject::process_modifier_cut(), Slic3r::ModelObject::process_solid_part_cut(), Slic3r::ModelObject::process_volume_cut(), and Slic3r::GUI::update_object_cut_id().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ is_bridge()

bool Slic3r::ExtrusionRole::is_bridge ( ) const
inline
constexpr bool has(option_type t) const
Definition enum_bitmask.hpp:47

References Slic3r::Bridge, and Slic3r::enum_bitmask< option_type, typename >::has().

Referenced by Slic3r::GCode::_extrude(), Slic3r::SupportSpotsGenerator::check_extrusion_entity_stability(), Slic3r::extrusion_role_to_gcode_extrusion_role(), Slic3r::ExtrusionPath::polygons_covered_by_spacing(), and Slic3r::PerimeterGenerator::thick_polyline_to_multi_path().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ is_external()

bool Slic3r::ExtrusionRole::is_external ( ) const
inline

References Slic3r::External, and Slic3r::enum_bitmask< option_type, typename >::has().

Referenced by Slic3r::extrusion_role_to_gcode_extrusion_role(), is_external_perimeter(), is_support_base(), is_support_interface(), and Slic3r::Layer::sort_perimeters_into_islands().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ is_external_perimeter()

bool Slic3r::ExtrusionRole::is_external_perimeter ( ) const
inline
82{ return this->is_perimeter() && this->is_external(); }
bool is_external() const
Definition ExtrusionRole.hpp:85
bool is_perimeter() const
Definition ExtrusionRole.hpp:81

References is_external(), and is_perimeter().

Referenced by Slic3r::GCode::_extrude(), and Slic3r::ExtrusionLine::is_external_perimeter().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ is_infill()

bool Slic3r::ExtrusionRole::is_infill ( ) const
inline

References Slic3r::enum_bitmask< option_type, typename >::has(), and Slic3r::Infill.

Referenced by Slic3r::GCode::_extrude(), Slic3r::LayerTools::extruder(), and is_solid_infill().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ is_mixed()

bool Slic3r::ExtrusionRole::is_mixed ( ) const
inline

References Slic3r::enum_bitmask< option_type, typename >::has(), and Slic3r::Mixed.

Referenced by Slic3r::GCode::process_layer_single_object().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ is_perimeter()

bool Slic3r::ExtrusionRole::is_perimeter ( ) const
inline

References Slic3r::enum_bitmask< option_type, typename >::has(), and Slic3r::Perimeter.

Referenced by Slic3r::GCode::_extrude(), Slic3r::SupportSpotsGenerator::check_extrusion_entity_stability(), Slic3r::extrusion_role_to_gcode_extrusion_role(), and is_external_perimeter().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ is_solid_infill()

bool Slic3r::ExtrusionRole::is_solid_infill ( ) const
inline
bool is_infill() const
Definition ExtrusionRole.hpp:83

References Slic3r::enum_bitmask< option_type, typename >::has(), is_infill(), and Slic3r::Solid.

Referenced by Slic3r::GCode::_extrude(), and Slic3r::ToolOrdering::collect_extruders().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ is_support()

bool Slic3r::ExtrusionRole::is_support ( ) const
inline

References Slic3r::enum_bitmask< option_type, typename >::has(), and Slic3r::Support.

Referenced by is_support_base(), and is_support_interface().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ is_support_base()

bool Slic3r::ExtrusionRole::is_support_base ( ) const
inline
89{ return this->is_support() && ! this->is_external(); }
bool is_support() const
Definition ExtrusionRole.hpp:88

References is_external(), and is_support().

Referenced by Slic3r::GCode::process_layer_single_object().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ is_support_interface()

bool Slic3r::ExtrusionRole::is_support_interface ( ) const
inline
90{ return this->is_support() && this->is_external(); }

References is_external(), and is_support().

Referenced by Slic3r::GCode::process_layer_single_object().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ lower()

template<class option_type , typename = typename std::enable_if<std::is_enum<option_type>::value>::type>
constexpr bool Slic3r::enum_bitmask< option_type, typename >::lower ( const enum_bitmask< option_type, typename >  r) const
inlineconstexprinherited
52{ return m_bits < r.m_bits; }

References Slic3r::enum_bitmask< option_type, typename >::m_bits.

Referenced by Slic3r::SurfaceFillParams::operator<().

+ Here is the caller graph for this function:

◆ mask_value()

template<class option_type , typename = typename std::enable_if<std::is_enum<option_type>::value>::type>
static constexpr underlying_type Slic3r::enum_bitmask< option_type, typename >::mask_value ( option_type  o)
inlinestaticconstexprprivateinherited
19{ return 1 << static_cast<underlying_type>(o); }
typename std::underlying_type< option_type >::type underlying_type
Definition enum_bitmask.hpp:16

Referenced by Slic3r::enum_bitmask< option_type, typename >::has(), Slic3r::enum_bitmask< option_type, typename >::operator&(), Slic3r::enum_bitmask< option_type, typename >::operator|(), and Slic3r::enum_bitmask< option_type, typename >::operator|=().

+ Here is the caller graph for this function:

◆ operator!=()

template<class option_type , typename = typename std::enable_if<std::is_enum<option_type>::value>::type>
constexpr bool Slic3r::enum_bitmask< option_type, typename >::operator!= ( const enum_bitmask< option_type, typename >  r) const
inlineconstexprinherited
50{ return m_bits != r.m_bits; }

References Slic3r::enum_bitmask< option_type, typename >::m_bits.

◆ operator&()

template<class option_type , typename = typename std::enable_if<std::is_enum<option_type>::value>::type>
constexpr bool Slic3r::enum_bitmask< option_type, typename >::operator& ( option_type  t) const
inlineconstexprinherited
46{ return m_bits & mask_value(t); }

References Slic3r::enum_bitmask< option_type, typename >::m_bits, and Slic3r::enum_bitmask< option_type, typename >::mask_value().

+ Here is the call graph for this function:

◆ operator==()

template<class option_type , typename = typename std::enable_if<std::is_enum<option_type>::value>::type>
constexpr bool Slic3r::enum_bitmask< option_type, typename >::operator== ( const enum_bitmask< option_type, typename >  r) const
inlineconstexprinherited
49{ return m_bits == r.m_bits; }

References Slic3r::enum_bitmask< option_type, typename >::m_bits.

◆ operator|() [1/2]

template<class option_type , typename = typename std::enable_if<std::is_enum<option_type>::value>::type>
constexpr enum_bitmask Slic3r::enum_bitmask< option_type, typename >::operator| ( enum_bitmask< option_type >  t) const
inlineconstexprinherited
37{ return enum_bitmask(m_bits | t.m_bits); }
constexpr enum_bitmask()
Definition enum_bitmask.hpp:26

References Slic3r::enum_bitmask< option_type, typename >::enum_bitmask(), and Slic3r::enum_bitmask< option_type, typename >::m_bits.

+ Here is the call graph for this function:

◆ operator|() [2/2]

template<class option_type , typename = typename std::enable_if<std::is_enum<option_type>::value>::type>
constexpr enum_bitmask Slic3r::enum_bitmask< option_type, typename >::operator| ( option_type  t) const
inlineconstexprinherited
34{ return enum_bitmask(m_bits | mask_value(t)); }

References Slic3r::enum_bitmask< option_type, typename >::enum_bitmask(), Slic3r::enum_bitmask< option_type, typename >::m_bits, and Slic3r::enum_bitmask< option_type, typename >::mask_value().

+ Here is the call graph for this function:

◆ operator|=() [1/2]

template<class option_type , typename = typename std::enable_if<std::is_enum<option_type>::value>::type>
constexpr void Slic3r::enum_bitmask< option_type, typename >::operator|= ( enum_bitmask< option_type >  t)
inlineconstexprinherited
43{ m_bits = enum_bitmask(m_bits | t.m_bits); }

References Slic3r::enum_bitmask< option_type, typename >::enum_bitmask(), and Slic3r::enum_bitmask< option_type, typename >::m_bits.

+ Here is the call graph for this function:

◆ operator|=() [2/2]

template<class option_type , typename = typename std::enable_if<std::is_enum<option_type>::value>::type>
constexpr void Slic3r::enum_bitmask< option_type, typename >::operator|= ( option_type  t)
inlineconstexprinherited

References Slic3r::enum_bitmask< option_type, typename >::enum_bitmask(), Slic3r::enum_bitmask< option_type, typename >::m_bits, and Slic3r::enum_bitmask< option_type, typename >::mask_value().

+ Here is the call graph for this function:

Member Data Documentation

◆ BridgeInfill

◆ ExternalPerimeter

◆ GapFill

◆ InternalInfill

◆ Ironing

◆ m_bits

◆ Mixed

◆ None

◆ OverhangPerimeter

◆ Perimeter

constexpr const ExtrusionRoleModifiers Slic3r::ExtrusionRole::Perimeter { ExtrusionRoleModifier::Perimeter }
staticconstexpr

◆ Skirt

constexpr const ExtrusionRoleModifiers Slic3r::ExtrusionRole::Skirt { ExtrusionRoleModifier::Skirt }
staticconstexpr

◆ SolidInfill

◆ SupportMaterial

◆ SupportMaterialInterface

◆ TopSolidInfill

◆ WipeTower


The documentation for this struct was generated from the following file: