Skip to content

Commit

Permalink
FIX-CAP: solved depth gui for drill feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
9and3 committed Aug 21, 2023
1 parent 13dba5a commit 4c5d6dd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/AIAC/Feedback/HoleFeedback.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace AIAC {
pt2->SetVisibility(false);

this->m_InfoText = GOText::Add("///", *pt1);
this->m_InfoText->SetTextSize(GOTextSize::Small);
this->m_InfoText->SetColor(GOColor::WHITE);

this->m_HoleLine2ToolStart = GOLine::Add(*pt1, *pt2);
Expand Down Expand Up @@ -117,7 +118,7 @@ namespace AIAC {
if (angleOrientRoundedStr.size() == 1) angleOrientRoundedStr = "0" + angleOrientRoundedStr;

// (iv) depth
float depthLeft = this->m_Visualizer.m_HoleLineAxis->GetPEnd().DistanceTo(*AC_FF_TOOL->GetData<DrillBitData>().TooltipGO);
float depthLeft = this->m_Visualizer.m_HoleLineAxis->GetPStart().DistanceTo(*AC_FF_TOOL->GetData<DrillBitData>().TooltipGO);
float holeLength = this->m_Visualizer.m_HoleLineAxis->GetLength();
float depthDrilled = holeLength - depthLeft;
float depthDrilledScaled = depthDrilled / scaleF;
Expand All @@ -129,6 +130,7 @@ namespace AIAC {
if (160.f < angle && angle < 200.f) // TODO: set tolerance var member, 20deg for now
{
distScaledMMStr = "00";
this->m_Visualizer.m_HoleLine2ToolStart->SetColor(GOColor::YELLOW);
if (depthDrilled < 0.f)
this->m_Visualizer.m_HoleLine2ToolEnd->SetColor(GOColor::RED);
else
Expand Down
6 changes: 5 additions & 1 deletion src/AIAC/Feedback/HoleFeedback.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@
#include "FabFeedback.h"
#include "utils/GeometryUtils.h"

namespace AIAC{
namespace AIAC
{
/**
@brief The visualizer for the HoleFeedback class
*/
class HoleFeedbackVisualizer : public FeedbackVisualizer {
public:
HoleFeedbackVisualizer();
Expand Down
2 changes: 1 addition & 1 deletion src/AIAC/GOSys/GOPrimitive.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace AIAC
struct GOTextSize
{
static constexpr double Default = 1.0;
static constexpr double Small = 2.5;
static constexpr double Small = 0.5;
static constexpr double Medium = 5.0;
static constexpr double Big = 10.0;
};
Expand Down

0 comments on commit 4c5d6dd

Please sign in to comment.