Algorithm to remap support shape, fix bugs in pad/pocket

This commit is contained in:
wmayer
2012-11-04 16:48:52 +01:00
parent dca1b4bf5c
commit 22c0f85672
5 changed files with 114 additions and 6 deletions

View File

@@ -407,13 +407,13 @@ bool TaskDlgPocketParameters::accept()
//Gui::Command::openCommand("Pocket changed");
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.Length = %f",name.c_str(),parameter->getLength());
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.Type = %u",name.c_str(),parameter->getMode());
const char* facename = parameter->getFaceName().data();
QByteArray facename = parameter->getFaceName();
PartDesign::Pocket* pcPocket = static_cast<PartDesign::Pocket*>(PocketView->getObject());
Part::Feature* support = pcPocket->getSupport();
if (support != NULL && facename && facename[0] != '\0') {
if (support != NULL && !facename.isEmpty()) {
QString buf = QString::fromUtf8("(App.ActiveDocument.%1,[\"%2\"])");
buf = buf.arg(QString::fromUtf8(support->getNameInDocument()));
buf = buf.arg(QString::fromUtf8(facename));
buf = buf.arg(QString::fromUtf8(facename.data()));
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.UpToFace = %s", name.c_str(), buf.toStdString().c_str());
} else
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.%s.UpToFace = None", name.c_str());