Merge branch 'master' into macosx-macports-enable-finding-qt4

This commit is contained in:
Marco Molteni
2016-08-22 17:55:33 +02:00
committed by GitHub
2 changed files with 19 additions and 12 deletions

View File

@@ -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;

View File

@@ -63,6 +63,9 @@ void CmdPrimtiveCompAdditive::activated(int iMsg)
PartDesign::Body *pcActiveBody = PartDesignGui::getBody(/*messageIfNot = */true);
if (!pcActiveBody) return;
Gui::ActionGroup* pcAction = qobject_cast<Gui::ActionGroup*>(_pcAction);
pcAction->setIcon(pcAction->actions().at(iMsg)->icon());
std::string FeatName;
std::string CSName = getUniqueObjectName("CoordinateSystem");;
if(iMsg == 0) {
@@ -249,6 +252,9 @@ void CmdPrimtiveCompSubtractive::activated(int iMsg)
PartDesign::Body *pcActiveBody = PartDesignGui::getBody(/*messageIfNot = */true);
if (!pcActiveBody) return;
Gui::ActionGroup* pcAction = qobject_cast<Gui::ActionGroup*>(_pcAction);
pcAction->setIcon(pcAction->actions().at(iMsg)->icon());
//check if we already have a feature as subtractive ones work only if we have
//something to subtract from.
App::DocumentObject *prevSolid = pcActiveBody->Tip.getValue();