Just detect support layer via virtual function instead of relying on typeid to save the day.

This commit is contained in:
Joseph Lenox 2018-07-18 22:26:13 -05:00
parent 82f227d718
commit f21148e0d4

View File

@ -137,6 +137,9 @@ class Layer {
void detect_surfaces_type();
/// Processes the external surfaces
void process_external_surfaces();
/// polymorphic id
virtual bool is_support() const { return false;}
protected:
size_t _id; ///< sequential number of layer, 0-based
@ -169,6 +172,9 @@ class SupportLayer : public Layer {
/// Populated in SupportMaterial.pm in sub generate_toolpaths
ExtrusionEntityCollection support_interface_fills;
/// polymorphic id
bool is_support() const override { return true;}
protected:
/// Constructor
SupportLayer(size_t id, PrintObject *object, coordf_t height,