NEW:add groove cut function

Jira:STUDIO-4227
Approximately 70% of the code comes from Prusa,thanks for PrusaSlcer and YuSanka

commit 492e356a21734b3503caae115fbb280da5fbaa22
Author: YuSanka <yusanka@gmail.com>
Date:   Thu Aug 3 16:09:28 2023 +0200
    CutGizmo: Fixed and improved Undo/Redo.
...

Change-Id: I63abb69180aec2ab0ce9bc8f30477d9e9a25a5fb
This commit is contained in:
zhou.xu
2023-11-01 09:33:21 +08:00
committed by Lane.Wei
parent 88e27d84c2
commit f9f44d0785
13 changed files with 1451 additions and 689 deletions
+1 -1
View File
@@ -1811,7 +1811,7 @@ void ModelObject::apply_cut_attributes(ModelObjectCutAttributes attributes)
void ModelObject::clone_for_cut(ModelObject **obj)
{
(*obj) = ModelObject::new_clone(*this);
(*obj)->set_model(nullptr);
(*obj)->set_model(this->get_model());
(*obj)->sla_support_points.clear();
(*obj)->sla_drain_holes.clear();
(*obj)->sla_points_status = sla::PointsStatus::NoPoints;
+5
View File
@@ -234,6 +234,11 @@ private:
friend class ModelObject;
};
enum class CutMode : int {
cutPlanar,
cutTongueAndGroove
};
enum class CutConnectorType : int {
Plug,
Dowel,
+1
View File
@@ -70,6 +70,7 @@ using Transform2d = Eigen::Transform<double, 2, Eigen::Affine, Eigen::DontAli
using Transform3f = Eigen::Transform<float, 3, Eigen::Affine, Eigen::DontAlign>;
using Transform3d = Eigen::Transform<double, 3, Eigen::Affine, Eigen::DontAlign>;
using ColorRGBA = std::array<float, 4>;
// I don't know why Eigen::Transform::Identity() return a const object...
template<int N, class T> Transform<N, T> identity() { return Transform<N, T>::Identity(); }
inline const auto &identity3f = identity<3, float>;