SLA support points improvements

- semi-intelligent algorithm to place support points
- enhanced ImGui dialog with editing/non-editing mode
- support points can have different head diameter (only implemented in GUI so far)
- autogenerated points supporting emerging islands are annotated and the info is kept
This commit is contained in:
Lukas Matena 2019-01-30 08:26:23 +01:00
parent f4243c694f
commit 21026ec9a8
16 changed files with 433 additions and 495 deletions

View file

@ -607,10 +607,18 @@ EigenMesh3D to_eigenmesh(const ModelObject& modelobj) {
return to_eigenmesh(modelobj.raw_mesh());
}
PointSet to_point_set(const std::vector<Vec3d> &v)
PointSet to_point_set(const std::vector<SupportPoint> &v)
{
PointSet ret(v.size(), 3);
{ long i = 0; for(const Vec3d& p : v) ret.row(i++) = p; }
PointSet ret(v.size(), 5);
long i = 0;
for(const SupportPoint& support_point : v) {
ret.row(i)(0) = support_point.pos(0);
ret.row(i)(1) = support_point.pos(1);
ret.row(i)(2) = support_point.pos(2);
ret.row(i)(3) = support_point.head_front_radius;
ret.row(i)(4) = (float)support_point.is_new_island;
++i;
}
return ret;
}