From 5e0789e2f1c692a0868417210bf29950c5a8a6f4 Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 28 Feb 2022 18:10:58 +0100 Subject: [PATCH] PD: fix const correctness in ProfileBased --- src/Mod/PartDesign/App/FeatureSketchBased.cpp | 4 ++-- src/Mod/PartDesign/App/FeatureSketchBased.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Mod/PartDesign/App/FeatureSketchBased.cpp b/src/Mod/PartDesign/App/FeatureSketchBased.cpp index 9aa05e2d3a..1af38933d0 100644 --- a/src/Mod/PartDesign/App/FeatureSketchBased.cpp +++ b/src/Mod/PartDesign/App/FeatureSketchBased.cpp @@ -918,7 +918,7 @@ bool ProfileBased::isParallelPlane(const TopoDS_Shape & s1, const TopoDS_Shape & return false; } -double ProfileBased::getReversedAngle(const Base::Vector3d & b, const Base::Vector3d & v) +double ProfileBased::getReversedAngle(const Base::Vector3d & b, const Base::Vector3d & v) const { try { Part::Feature* obj = getVerifiedObject(); @@ -947,7 +947,7 @@ double ProfileBased::getReversedAngle(const Base::Vector3d & b, const Base::Vect } void ProfileBased::getAxis(const App::DocumentObject * pcReferenceAxis, const std::vector &subReferenceAxis, - Base::Vector3d& base, Base::Vector3d& dir, ProfileBased::ForbiddenAxis checkAxis) + Base::Vector3d& base, Base::Vector3d& dir, ProfileBased::ForbiddenAxis checkAxis) const { auto verifyAxisFunc = [](ProfileBased::ForbiddenAxis checkAxis, const gp_Pln& sketchplane, const gp_Dir& dir) { switch (checkAxis) { diff --git a/src/Mod/PartDesign/App/FeatureSketchBased.h b/src/Mod/PartDesign/App/FeatureSketchBased.h index d8b9e377b0..fd1e4af0be 100644 --- a/src/Mod/PartDesign/App/FeatureSketchBased.h +++ b/src/Mod/PartDesign/App/FeatureSketchBased.h @@ -151,10 +151,10 @@ protected: /// Used to suggest a value for Reversed flag so that material is always removed (Groove) or added (Revolution) from the support - double getReversedAngle(const Base::Vector3d& b, const Base::Vector3d& v); + double getReversedAngle(const Base::Vector3d& b, const Base::Vector3d& v) const; /// get Axis from ReferenceAxis void getAxis(const App::DocumentObject* pcReferenceAxis, const std::vector& subReferenceAxis, - Base::Vector3d& base, Base::Vector3d& dir, ForbiddenAxis checkAxis); + Base::Vector3d& base, Base::Vector3d& dir, ForbiddenAxis checkAxis) const; void onChanged(const App::Property* prop); private: