Remove BasePlanes from part design

This commit is contained in:
Stefan Tröger
2015-05-03 12:40:19 +02:00
parent eb226967f3
commit f873fb80e9
5 changed files with 22 additions and 29 deletions

View File

@@ -290,7 +290,7 @@ void Workbench::_doMigration(const App::Document* doc)
if (fabs(offset) < Precision::Confusion()) {
// One of the base planes
Gui::Command::doCommand(Gui::Command::Doc,"App.activeDocument().%s.Support = (App.activeDocument().%s,['%s'])",
sketch->getNameInDocument(), BaseplaneNames[index], side.c_str());
sketch->getNameInDocument(), App::Part::BaseplaneTypes[index], side.c_str());
} else {
// Offset to base plane
// Find out which direction we need to offset
@@ -307,7 +307,7 @@ void Workbench::_doMigration(const App::Document* doc)
std::string Datum = doc->getUniqueObjectName("DatumPlane");
Gui::Command::doCommand(Gui::Command::Doc,"App.activeDocument().addObject('PartDesign::Plane','%s')",Datum.c_str());
QString refStr = QString::fromAscii("[(App.activeDocument().") + QString::fromAscii(BaseplaneNames[index]) +
QString refStr = QString::fromAscii("[(App.activeDocument().") + QString::fromAscii(App::Part::BaseplaneTypes[index]) +
QString::fromAscii(",'')]");
Gui::Command::doCommand(Gui::Command::Doc,"App.activeDocument().%s.References = %s",Datum.c_str(), refStr.toStdString().c_str());
Gui::Command::doCommand(Gui::Command::Doc,"App.activeDocument().%s.Offset = %f",Datum.c_str(), offset);