diff --git a/src/Mod/Part/App/Attacher.cpp b/src/Mod/Part/App/Attacher.cpp index 9ce107f5cbe5..c809bde64d83 100644 --- a/src/Mod/Part/App/Attacher.cpp +++ b/src/Mod/Part/App/Attacher.cpp @@ -1577,22 +1577,22 @@ AttachEngineLine *AttachEngineLine::copy() const Base::Placement AttachEngineLine::calculateAttachedPlacement(Base::Placement origPlacement) const { eMapMode mmode = this->mapMode; - if (mmode == mmDeactivated) - throw ExceptionCancel();//to be handled in positionBySupport, to not do anything if disabled //modes that are mirrors of attacher3D: bool bReUsed = true; Base::Placement presuperPlacement; switch(mmode){ + case mmDeactivated: + throw ExceptionCancel();//to be handled in positionBySupport, to not do anything if disabled case mm1AxisX: mmode = mmObjectYZ; - break; + break; case mm1AxisY: mmode = mmObjectXZ; - break; + break; case mm1AxisZ: mmode = mmObjectXY; - break; + break; case mm1AxisCurv: mmode = mmRevolutionSection; //the line should go along Y, not Z @@ -1600,18 +1600,19 @@ Base::Placement AttachEngineLine::calculateAttachedPlacement(Base::Placement ori Base::Rotation( Base::Vector3d(0.0,0.0,1.0), Base::Vector3d(0.0,1.0,0.0) ) ); - break; + break; case mm1Binormal: mmode = mmFrenetTN; - break; + break; case mm1Normal: mmode = mmFrenetTB; - break; + break; case mm1Tangent: mmode = mmNormalToPath; - break; + break; default: bReUsed = false; + break; } Base::Placement plm; @@ -1640,7 +1641,7 @@ Base::Placement AttachEngineLine::calculateAttachedPlacement(Base::Placement ori switch (mmode) { case mmDeactivated: //should have been filtered out already! - break; + break; case mm1AxisInertia1: case mm1AxisInertia2: case mm1AxisInertia3:{ @@ -1845,12 +1846,12 @@ AttachEnginePoint *AttachEnginePoint::copy() const Base::Placement AttachEnginePoint::calculateAttachedPlacement(Base::Placement origPlacement) const { eMapMode mmode = this->mapMode; - if (mmode == mmDeactivated) - throw ExceptionCancel();//to be handled in positionBySupport, to not do anything if disabled //modes that are mirrors of attacher3D: bool bReUsed = true; switch(mmode){ + case mmDeactivated: + throw ExceptionCancel();//to be handled in positionBySupport, to not do anything if disabled case mm0Origin: mmode = mmObjectXY; break;