Skip to content

Commit

Permalink
FIX: label acim hole moved to end
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrea Settimi committed May 31, 2024
2 parents 3bbcb52 + 92401cf commit 6c442c4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
9 changes: 9 additions & 0 deletions imgui.ini
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,11 @@ Collapsed=0
[Window][augmented_carpentry]
Pos=414,26
Size=384,463
<<<<<<< HEAD
Collapsed=0
=======
Collapsed=1
>>>>>>> patchUI

[Window][bla]
Pos=30,352
Expand Down Expand Up @@ -274,8 +278,13 @@ Size=800,416
Collapsed=0

[Window][Log Recorder]
<<<<<<< HEAD
Pos=-2,57
Size=189,133
=======
Pos=2,53
Size=166,117
>>>>>>> patchUI
Collapsed=1

[Table][0xD0F0C6E3,2]
Expand Down
10 changes: 4 additions & 6 deletions src/AIAC/ACInfoModel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,11 +355,8 @@ namespace AIAC
holeInfo.m_StartPointGO = GOPoint::Add(holeInfo.m_Start, 2.0f);
holeInfo.m_EndPointGO = GOPoint::Add(holeInfo.m_End, 2.0f);
auto centerPoint = (holeInfo.m_Start + holeInfo.m_End) * 0.5f;
holeInfo.m_IDLabelGO = GOText::Add(holeInfo.m_ID, centerPoint, m_LabelSize);
auto radiusText = std::to_string(holeInfo.m_Radius);
radiusText = radiusText.substr(0, radiusText.find(".") + 3);
holeInfo.m_RadiusLabelGO = GOText::Add(radiusText, holeInfo.m_Start, m_LabelSize);
holeInfo.m_RadiusLabelGO->SetVisibility(false);
std::string shortenHoleID = m_TimberInfo.ShortenComponentID(holeInfo.m_ID);
holeInfo.m_IDLabelGO = GOText::Add(shortenHoleID, holeInfo.m_End, m_LabelSize);

holeInfo.m_GOPrimitives.push_back(holeInfo.m_AxisGO);
holeInfo.m_GOPrimitives.push_back(holeInfo.m_CylinderGO);
Expand All @@ -379,7 +376,8 @@ namespace AIAC
cutInfo.m_State = StringToState(cut.child("state").child_value());
cutInfo.IsMarkedDone = cutInfo.m_State == ACIMState::DONE;
cutInfo.m_Center = StringToVec3(cut.child("center").child_value()) * m_Scale;
cutInfo.m_IDLabelGO = GOText::Add(cutInfo.m_ID, cutInfo.m_Center, m_LabelSize);
std::string shortenCutID = m_TimberInfo.ShortenComponentID(cutInfo.m_ID);
cutInfo.m_IDLabelGO = GOText::Add(shortenCutID, cutInfo.m_Center, m_LabelSize);
cutInfo.m_GOPrimitives.push_back(cutInfo.m_IDLabelGO);

auto faces = cut.child("faces");
Expand Down

0 comments on commit 6c442c4

Please sign in to comment.