diff --git a/src/Mod/Part/App/Attacher.cpp b/src/Mod/Part/App/Attacher.cpp index 71f3994bea..f988fa0132 100644 --- a/src/Mod/Part/App/Attacher.cpp +++ b/src/Mod/Part/App/Attacher.cpp @@ -120,6 +120,8 @@ const char* AttachEngine::eMapModeStrings[]= { "InertialCS", + "FaceNormal", + NULL}; //this list must be in sync with eRefType enum. @@ -1565,6 +1567,8 @@ AttachEngineLine::AttachEngineLine() modeRefTypes[mm1AxisInertia2] = modeRefTypes[mm1AxisInertia1]; modeRefTypes[mm1AxisInertia3] = modeRefTypes[mm1AxisInertia1]; + modeRefTypes[mm1FaceNormal] = attacher3D.modeRefTypes[mmTangentPlane]; + this->EnableAllSupportedModes(); @@ -1613,6 +1617,9 @@ Base::Placement AttachEngineLine::calculateAttachedPlacement(Base::Placement ori case mm1Tangent: mmode = mmNormalToPath; break; + case mm1FaceNormal: + mmode = mmTangentPlane; + break; default: bReUsed = false; break; diff --git a/src/Mod/Part/App/Attacher.h b/src/Mod/Part/App/Attacher.h index 740318c77f..83605ad7ff 100644 --- a/src/Mod/Part/App/Attacher.h +++ b/src/Mod/Part/App/Attacher.h @@ -99,6 +99,8 @@ enum eMapMode { mmInertialCS, + mm1FaceNormal, + mmDummy_NumberOfModes//a value useful to check the validity of mode value };//see also eMapModeStrings[] definition in .cpp diff --git a/src/Mod/Part/Gui/AttacherTexts.cpp b/src/Mod/Part/Gui/AttacherTexts.cpp index f7f831cba7..d9e5c882fe 100644 --- a/src/Mod/Part/Gui/AttacherTexts.cpp +++ b/src/Mod/Part/Gui/AttacherTexts.cpp @@ -191,7 +191,7 @@ TextSet getUIStrings(Base::Type attacherType, eMapMode mmode) return TwoStrings(qApp->translate("Attacher1D", "Tangent","AttachmentLine mode caption"), qApp->translate("Attacher1D", "Line tangent to an edge. Optional vertex link defines where.","AttachmentLine mode tooltip")); case mm1Normal: - return TwoStrings(qApp->translate("Attacher1D", "Normal","AttachmentLine mode caption"), + return TwoStrings(qApp->translate("Attacher1D", "Normal to edge","AttachmentLine mode caption"), qApp->translate("Attacher1D", "Align to N vector of Frenet-Serret coordinate system of curved edge. Optional vertex link defines where.","AttachmentLine mode tooltip")); case mm1Binormal: return TwoStrings(qApp->translate("Attacher1D", "Binormal","AttachmentLine mode caption"), @@ -220,6 +220,9 @@ TextSet getUIStrings(Base::Type attacherType, eMapMode mmode) case mm1AxisInertia3: return TwoStrings(qApp->translate("Attacher1D", "3rd principal axis","AttachmentLine mode caption"), qApp->translate("Attacher1D", "Line follows third principal axis of inertia.","AttachmentLine mode tooltip")); + case mm1FaceNormal: + return TwoStrings(qApp->translate("Attacher1D", "Normal to surface","AttachmentLine mode caption"), + qApp->translate("Attacher1D", "Line perpendicular to surface at point set by vertex.","AttachmentLine mode tooltip")); default: break; }