PartDesign: Modeling features work with faces
-Rename Sketchbased to ProfileBased to show new behavior -Adopt ProfileBased to make the relevant helper functions work with faces too -Adopt features for unified use of helper functions -Adopt commands to allow face selection
This commit is contained in:
@@ -50,8 +50,8 @@ ViewProviderSketchBased::~ViewProviderSketchBased()
|
||||
|
||||
std::vector<App::DocumentObject*> ViewProviderSketchBased::claimChildren(void) const {
|
||||
std::vector<App::DocumentObject*> temp;
|
||||
App::DocumentObject* sketch = static_cast<PartDesign::SketchBased*>(getObject())->Sketch.getValue();
|
||||
if (sketch != NULL)
|
||||
App::DocumentObject* sketch = static_cast<PartDesign::ProfileBased*>(getObject())->Profile.getValue();
|
||||
if (sketch != NULL && sketch->isDerivedFrom(Part::Part2DObject::getClassTypeId()))
|
||||
temp.push_back(sketch);
|
||||
|
||||
return temp;
|
||||
@@ -59,12 +59,12 @@ std::vector<App::DocumentObject*> ViewProviderSketchBased::claimChildren(void) c
|
||||
|
||||
|
||||
bool ViewProviderSketchBased::onDelete(const std::vector<std::string> &s) {
|
||||
PartDesign::SketchBased* feature = static_cast<PartDesign::SketchBased*>(getObject());
|
||||
PartDesign::ProfileBased* feature = static_cast<PartDesign::ProfileBased*>(getObject());
|
||||
|
||||
// get the Sketch
|
||||
Sketcher::SketchObject *pcSketch = 0;
|
||||
if (feature->Sketch.getValue())
|
||||
pcSketch = static_cast<Sketcher::SketchObject*>(feature->Sketch.getValue());
|
||||
if (feature->Profile.getValue())
|
||||
pcSketch = static_cast<Sketcher::SketchObject*>(feature->Profile.getValue());
|
||||
|
||||
// if abort command deleted the object the sketch is visible again
|
||||
if (pcSketch && Gui::Application::Instance->getViewProvider(pcSketch))
|
||||
|
||||
Reference in New Issue
Block a user