PartDesign: Allow use of circle edge as axis in ProfileBased

This commit is contained in:
David Osterberg
2021-02-14 08:48:31 +01:00
committed by wwmayer
parent 9120d4a7d9
commit c862ec458c
7 changed files with 34 additions and 17 deletions

View File

@@ -92,7 +92,6 @@ const QString TaskSketchBasedParameters::onAddSelection(const Gui::SelectionChan
return refStr;
}
void TaskSketchBasedParameters::startReferenceSelection(App::DocumentObject* profile, App::DocumentObject* base)
{
Gui::Document* doc = vp->getDocument();
@@ -113,7 +112,7 @@ void TaskSketchBasedParameters::finishReferenceSelection(App::DocumentObject* pr
}
}
void TaskSketchBasedParameters::onSelectReference(const bool pressed, const bool edge, const bool face, const bool planar) {
void TaskSketchBasedParameters::onSelectReference(const bool pressed, const bool edge, const bool face, const bool planar, const bool circle) {
// Note: Even if there is no solid, App::Plane and Part::Datum can still be selected
PartDesign::ProfileBased* pcSketchBased = dynamic_cast<PartDesign::ProfileBased*>(vp->getObject());
@@ -125,7 +124,7 @@ void TaskSketchBasedParameters::onSelectReference(const bool pressed, const bool
startReferenceSelection(pcSketchBased, prevSolid);
Gui::Selection().clearSelection();
Gui::Selection().addSelectionGate
(new ReferenceSelection(prevSolid, edge, face, planar));
(new ReferenceSelection(prevSolid, edge, face, planar, false, false, circle));
} else {
Gui::Selection().rmvSelectionGate();
finishReferenceSelection(pcSketchBased, prevSolid);