fix groove
This commit is contained in:
@@ -999,7 +999,7 @@ void CmdPartDesignRevolution::activated(int iMsg)
|
||||
return;
|
||||
|
||||
Gui::Command* cmd = this;
|
||||
auto worker = [this, cmd, pcActiveBody](Part::Feature* sketch, std::string FeatName) {
|
||||
auto worker = [this, cmd, &pcActiveBody](Part::Feature* sketch, std::string FeatName) {
|
||||
|
||||
if (FeatName.empty()) return;
|
||||
|
||||
@@ -1059,12 +1059,19 @@ void CmdPartDesignGroove::activated(int iMsg)
|
||||
return;
|
||||
|
||||
Gui::Command* cmd = this;
|
||||
auto worker = [this, cmd](Part::Feature* sketch, std::string FeatName) {
|
||||
auto worker = [this, cmd, &pcActiveBody](Part::Feature* sketch, std::string FeatName) {
|
||||
|
||||
if (FeatName.empty()) return;
|
||||
|
||||
Gui::Command::doCommand(Doc,"App.activeDocument().%s.ReferenceAxis = (App.activeDocument().%s,['V_Axis'])",
|
||||
FeatName.c_str(), sketch->getNameInDocument());
|
||||
if (sketch->isDerivedFrom(Part::Part2DObject::getClassTypeId())) {
|
||||
Gui::Command::doCommand(Doc, "App.activeDocument().%s.ReferenceAxis = (App.activeDocument().%s,['V_Axis'])",
|
||||
FeatName.c_str(), sketch->getNameInDocument());
|
||||
}
|
||||
else {
|
||||
Gui::Command::doCommand(Doc, "App.activeDocument().%s.ReferenceAxis = (App.activeDocument().%s,[\"\"])",
|
||||
FeatName.c_str(), pcActiveBody->getOrigin()->getY()->getNameInDocument());
|
||||
}
|
||||
|
||||
Gui::Command::doCommand(Doc,"App.activeDocument().%s.Angle = 360.0",FeatName.c_str());
|
||||
PartDesign::Groove* pcGroove = static_cast<PartDesign::Groove*>(cmd->getDocument()->getObject(FeatName.c_str()));
|
||||
if (pcGroove && pcGroove->suggestReversed())
|
||||
|
||||
Reference in New Issue
Block a user