Fix sketch on face of other body or part

The shapebinder object reduces the number of faces to 1, hence the subshape to select is always Face1 and not the original face name
This commit is contained in:
Stefan Tröger 2015-11-08 16:10:43 +01:00
parent 5f9bd72581
commit ef2437bb5c
2 changed files with 9 additions and 2 deletions

View File

@ -423,7 +423,8 @@ void CmdPartDesignNewSketch::activated(int iMsg)
if(PlaneFilter.match())
supportString = std::string("(App.activeDocument().") + copy->getNameInDocument() + ", '')";
else
supportString = std::string("(App.activeDocument().") + copy->getNameInDocument() + ", '" + sub +"')";
//it is ensured that only a single face is selected, hence it must always be Face1 of the shapebinder
supportString = std::string("(App.activeDocument().") + copy->getNameInDocument() + ", 'Face1')";
}
}
}

View File

@ -320,7 +320,13 @@ App::DocumentObject* TaskFeaturePick::makeCopy(App::DocumentObject* obj, std::st
}
else {
auto name = std::string("Reference") + std::string(obj->getNameInDocument());
std::string name;
if(!independent)
name = std::string("Reference");
else
name = std::string("Copy");
name += std::string(obj->getNameInDocument());
std::string entity;
if(!sub.empty())
entity = sub;