Skip to content

Commit

Permalink
MeasureRadius: Display label on curve rather than curve center
Browse files Browse the repository at this point in the history
  • Loading branch information
hlorus committed Jan 5, 2024
1 parent f544f1f commit 8f8eda9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 15 deletions.
1 change: 0 additions & 1 deletion src/Mod/Measure/App/MeasureBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
#include <App/FeaturePython.h>


// TODO: this is the base for the MeasureXXXXX classes. It should be renamed to MeasureBase and moved to Mod/Measure/App
namespace Measure
{

Expand Down
5 changes: 4 additions & 1 deletion src/Mod/Measure/App/MeasureRadius.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,10 @@ void MeasureRadius::onChanged(const App::Property* prop)

//! return a placement (location + orientation) for the first element
Base::Placement MeasureRadius::getPlacement() {
return getMeasureInfoFirst().placement;
auto loc = getMeasureInfoFirst().pointOnCurve;
auto p = Base::Placement();
p.setPosition(loc);
return p;
}


Expand Down
13 changes: 0 additions & 13 deletions src/Mod/Measure/App/MeasureRadius.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,25 +26,12 @@

#include <Mod/Measure/MeasureGlobal.h>

/*#include <functional>*/
/*#include <string.h>*/
/*#include <map>*/
/*#include <tuple>*/

/*#include <TopoDS_Shape.hxx>*/
/*#include <TopoDS_Vertex.hxx>*/
/*#include <BRep_Tool.hxx>*/
/*#include <gp_Pnt.hxx>*/
/*#include <TopExp.hxx>*/

#include <App/Application.h>
#include <App/PropertyLinks.h>
#include <App/PropertyUnits.h>
#include <App/GeoFeature.h>
#include <Base/Placement.h>

//#include <Mod/Part/App/TopoShape.h>

#include "MeasureBase.h"

namespace Measure
Expand Down

0 comments on commit 8f8eda9

Please sign in to comment.