| |
|
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
|
|
|
|
| #ifndef MEASURE_MEASURERADIUS_H |
| #define MEASURE_MEASURERADIUS_H |
|
|
| #include <Mod/Measure/MeasureGlobal.h> |
|
|
| #include <App/Application.h> |
| #include <App/PropertyLinks.h> |
| #include <App/PropertyUnits.h> |
| #include <App/GeoFeature.h> |
| #include <Base/Placement.h> |
|
|
| #include <Mod/Part/App/MeasureInfo.h> |
|
|
| #include "MeasureBase.h" |
|
|
|
|
| namespace Measure |
| { |
|
|
|
|
| class MeasureExport MeasureRadius: public Measure::MeasureBaseExtendable<Part::MeasureRadiusInfo> |
| { |
| PROPERTY_HEADER_WITH_OVERRIDE(Measure::MeasureRadius); |
|
|
| public: |
| |
| MeasureRadius(); |
| ~MeasureRadius() override; |
|
|
| App::PropertyLinkSub Element; |
| App::PropertyDistance Radius; |
|
|
| App::DocumentObjectExecReturn* execute() override; |
| const char* getViewProviderName() const override |
| { |
| return "MeasureGui::ViewProviderMeasureRadius"; |
| } |
|
|
| static bool isValidSelection(const App::MeasureSelection& selection); |
| static bool isPrioritizedSelection(const App::MeasureSelection& selection); |
| void parseSelection(const App::MeasureSelection& selection) override; |
|
|
| std::vector<std::string> getInputProps() override |
| { |
| return {"Element"}; |
| } |
| App::Property* getResultProp() override |
| { |
| return &this->Radius; |
| } |
|
|
| |
| Base::Placement getPlacement() const override; |
| |
| Base::Vector3d getPointOnCurve() const; |
|
|
| |
| std::vector<App::DocumentObject*> getSubject() const override; |
|
|
|
|
| private: |
| void onChanged(const App::Property* prop) override; |
| Part::MeasureRadiusInfoPtr getMeasureInfoFirst() const; |
| }; |
|
|
| } |
|
|
|
|
| #endif |
|
|