* Suppress to split cut objects
* ObjectList:
  * Use another icons to mark the cut objects and connectors 
  * For the cut object show parts, which are not connectors
* Set different colors for the Plugs and Dowels
* CutGizmo:
  * Invalidate CutGizmo after changes in ObjectList or perform a cut
  * CupPlane in Connectors mode: Unselect selection, when click on empty space
  * Connectors mode: Fixed performance issue
This commit is contained in:
YuSanka 2022-09-27 13:54:44 +02:00
parent e689be65db
commit 0201a5055a
10 changed files with 123 additions and 45 deletions

View file

@ -477,6 +477,7 @@ public:
int get_repaired_errors_count(const int vol_idx = -1) const;
bool is_cut() const { return cut_id.id().valid(); }
bool has_connectors() const;
private:
friend class Model;
@ -723,14 +724,26 @@ public:
struct CutInfo
{
bool is_connector{ false };
bool is_processed{ true };
CutConnectorType connector_type{ CutConnectorType::Plug };
float radius_tolerance;// [0.f : 1.f]
float height_tolerance;// [0.f : 1.f]
float radius_tolerance{ 0.f };// [0.f : 1.f]
float height_tolerance{ 0.f };// [0.f : 1.f]
void discard() { is_connector = false; }
CutInfo() = default;
CutInfo(CutConnectorType type, float rad_tolerance, float h_tolerance) :
is_connector(true),
is_processed(false),
connector_type(type),
radius_tolerance(rad_tolerance),
height_tolerance(h_tolerance)
{}
void set_processed() { is_processed = true; }
};
CutInfo cut_info;
bool is_cut_connector() const { return cut_info.is_processed && cut_info.is_connector; }
// The triangular model.
const TriangleMesh& mesh() const { return *m_mesh.get(); }
#if ENABLE_RAYCAST_PICKING