[PD] Support adding solid faces for loft and pipe sections
With these changes, one face per solid can be added as either the first "profile" or subsequent sections in loft and pipe. This commit depends on `App::PropertyXLinkSubList` preserving the order in which sections are added. A minor change this also adds is that when a solid's face is selected that face is mentioned in the fields instead of the solid (eg `Box:Face1` instead of `Box`).
This commit is contained in:
@@ -220,6 +220,20 @@ QString TaskSketchBasedParameters::getFaceReference(const QString& obj, const QS
|
||||
.arg(QString::fromLatin1(doc->getName()), o, sub);
|
||||
}
|
||||
|
||||
QString TaskSketchBasedParameters::make2DLabel(const App::DocumentObject* section,
|
||||
const std::vector<std::string>& subValues)
|
||||
{
|
||||
if(section->isDerivedFrom(Part::Part2DObject::getClassTypeId()))
|
||||
return QString::fromUtf8(section->Label.getValue());
|
||||
else {
|
||||
if(subValues.empty())
|
||||
throw Base::ValueError("No valid subelement linked in Part::Feature");
|
||||
|
||||
return QString::fromUtf8((std::string(section->getNameInDocument())
|
||||
+ ":" + subValues[0]).c_str());
|
||||
}
|
||||
}
|
||||
|
||||
TaskSketchBasedParameters::~TaskSketchBasedParameters()
|
||||
{
|
||||
Gui::Selection().rmvSelectionGate();
|
||||
|
||||
Reference in New Issue
Block a user