From f21148e0d43f608625e2277e9984b8d8d1f7a080 Mon Sep 17 00:00:00 2001 From: Joseph Lenox Date: Wed, 18 Jul 2018 22:26:13 -0500 Subject: [PATCH] Just detect support layer via virtual function instead of relying on typeid to save the day. --- xs/src/libslic3r/Layer.hpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xs/src/libslic3r/Layer.hpp b/xs/src/libslic3r/Layer.hpp index bf7aa7544..295c3b159 100644 --- a/xs/src/libslic3r/Layer.hpp +++ b/xs/src/libslic3r/Layer.hpp @@ -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,