Chash by mpv: in sketch of Extrusion cut try to move over external edge, result is crash. It is caused by recursive delete of referenced features to the external edge. The extrusion cut was in the list of deleted features.
aFromShape, aFromSize);
// Checking that the algorithm worked properly.
- if(!aPrismAlgo->isDone() || aPrismAlgo->shape()->isNull() || !aPrismAlgo->isValid()) {
+ if(!aPrismAlgo->isDone() || !aPrismAlgo->shape().get() || aPrismAlgo->shape()->isNull() ||
+ !aPrismAlgo->isValid()) {
setError("Extrusion algorithm failed");
theResults.clear();
return;
aFromShape, aFromAngle);
// Checking that the algorithm worked properly.
- if(!aRevolAlgo->isDone() || aRevolAlgo->shape()->isNull() || !aRevolAlgo->isValid()) {
+ if(!aRevolAlgo->isDone() || !aRevolAlgo->shape().get() || aRevolAlgo->shape()->isNull() ||
+ !aRevolAlgo->isValid()) {
setError("Revolution algorithm failed");
theResults.clear();
return;
anObjects.append(aFeature);
// the external feature should be removed with all references, sketch feature should be ignored
std::set<FeaturePtr> anIgnoredFeatures;
- anIgnoredFeatures.insert(theSketch);
// the current feature should be ignored, because it can use the external feature in the
// attributes and, therefore have a references to it. So, the delete functionality tries
// to delete this feature. Test case is creation of a constraint on external point,
anObjects.append(aFeature);
// the external feature should be removed with all references, sketch feature should be ignored
std::set<FeaturePtr> anIgnoredFeatures;
- anIgnoredFeatures.insert(theSketch);
// the current feature should be ignored, because it can use the external feature in the
// attributes and, therefore have a references to it. So, the delete functionality tries
// to delete this feature. Test case is creation of a constraint on external point,
anOperation->abort();
SessionPtr aMgr = ModelAPI_Session::get();
- std::set<FeaturePtr> anIgnoredFeatures;
- anIgnoredFeatures.insert(myModule->sketchMgr()->activeSketch());
QString aName = tr("Detach %1").arg(aLine->data()->name().c_str());
aMgr->startOperation(aName.toStdString());
- aWorkshop->deleteFeatures(aToDelFeatures, anIgnoredFeatures);
+ aWorkshop->deleteFeatures(aToDelFeatures);
aMgr->finishOperation();
}
myCoinsideLines.clear();
// 4. delete features
// sketch feature should be skipped, only sub-features can be removed
// when sketch operation is active
- std::set<FeaturePtr> anIgnoredFeatures;
- anIgnoredFeatures.insert(mySketchMgr->activeSketch());
- aWorkshop->deleteFeatures(aSketchObjects, anIgnoredFeatures);
-
+ aWorkshop->deleteFeatures(aSketchObjects);
// 5. stop operation
aWorkshop->displayer()->updateViewer();
aMgr->finishOperation();
//! objects features appear. If the user chose do not continue, the deletion is not performed
//! \return the success of the delete
bool deleteFeatures(const QObjectPtrList& theList,
- const std::set<FeaturePtr>& theIgnoredFeatures,
+ const std::set<FeaturePtr>& theIgnoredFeatures = std::set<FeaturePtr>(),
QWidget* theParent = 0,
const bool theAskAboutDeleteReferences = false);