More SLA support points improvements

- unselected objects are hidden when SLA gizmo is active
- support volumes are hidden when editing mode is active
- 3mf support points format versioning
This commit is contained in:
Lukas Matena 2019-02-01 16:12:00 +01:00
parent 21026ec9a8
commit f568f93f08
11 changed files with 248 additions and 97 deletions

View file

@ -7,6 +7,9 @@
#include <memory>
#include <Eigen/Geometry>
#include "SLACommon.hpp"
namespace Slic3r {
// Needed types from Point.hpp
@ -34,26 +37,6 @@ enum class PillarConnectionMode {
dynamic
};
struct SupportPoint {
Vec3f pos;
float head_front_radius;
bool is_new_island;
SupportPoint() :
pos(Vec3f::Zero()), head_front_radius(0.f), is_new_island(false) {}
SupportPoint(float pos_x, float pos_y, float pos_z, float head_radius, bool new_island) :
pos(pos_x, pos_y, pos_z), head_front_radius(head_radius), is_new_island(new_island) {}
SupportPoint(Vec3f position, float head_radius, bool new_island) :
pos(position), head_front_radius(head_radius), is_new_island(new_island) {}
SupportPoint(Eigen::Matrix<float, 5, 1, Eigen::DontAlign> data) :
pos(data(0), data(1), data(2)), head_front_radius(data(3)), is_new_island(data(4)) {}
bool operator==(const SupportPoint& sp) const { return (pos==sp.pos) && head_front_radius==sp.head_front_radius && is_new_island==sp.is_new_island; }
};
struct SupportConfig {
// Radius in mm of the pointing side of the head.
double head_front_radius_mm = 0.2;
@ -122,14 +105,6 @@ struct Controller {
std::function<void(void)> cancelfn = [](){};
};
/// An index-triangle structure for libIGL functions. Also serves as an
/// alternative (raw) input format for the SLASupportTree
struct EigenMesh3D {
Eigen::MatrixXd V;
Eigen::MatrixXi F;
double ground_level = 0;
};
using PointSet = Eigen::MatrixXd;
EigenMesh3D to_eigenmesh(const TriangleMesh& m);