// Processing of external (non-sketch) object
aSelectedObject = PartSet_Tools::createFixedObjectByExternal(theShape->impl<TopoDS_Shape>(),
theSelectedObject, theSketch, theTemporary);
- if (aSelectedObject.get()) {
- if (theTemporary)
+ if (aSelectedObject.get() && theTemporary)
myExternalObjectValidated = aSelectedObject;
- else
- myExternalObjects.append(aSelectedObject);
- }
}
return aSelectedObject;
}
-//********************************************************************
-/*ObjectPtr PartSet_ExternalObjectsMgr::externalObjectValidated(const ObjectPtr& theSelectedObject,
- const GeomShapePtr& theShape,
- const CompositeFeaturePtr& theSketch)
-{
- // TODO(nds): unite with externalObject()
- ObjectPtr aSelectedObject = PartSet_Tools::findFixedObjectByExternal(theShape->impl<TopoDS_Shape>(),
- theSelectedObject, theSketch);
- if (!aSelectedObject.get()) {
- // Processing of external (non-sketch) object
- aSelectedObject = PartSet_Tools::createFixedObjectByExternal(theShape->impl<TopoDS_Shape>(),
- theSelectedObject, theSketch);
- if (aSelectedObject.get())
- myExternalObjectValidated = aSelectedObject;
- }
- return aSelectedObject;
-}*/
-
//********************************************************************
void PartSet_ExternalObjectsMgr::removeExternal(const CompositeFeaturePtr& theSketch,
const FeaturePtr& theFeature,
{
if (theTemporary)
removeExternalObject(myExternalObjectValidated, theSketch, theFeature, theWorkshop);
- else{
- QObjectPtrList::const_iterator anIt = myExternalObjects.begin(), aLast = myExternalObjects.end();
- for (; anIt != aLast; anIt++) {
- ObjectPtr anObject = *anIt;
- removeExternalObject(anObject, theSketch, theFeature, theWorkshop);
- }
- myExternalObjects.clear();
- }
-}
-
-//********************************************************************
-void PartSet_ExternalObjectsMgr::removeUnusedExternalObjects(const QObjectPtrList& theIgnoreObjects,
- const CompositeFeaturePtr& theSketch,
- const FeaturePtr& theFeature)
-{
- /*
- // TODO(nds): unite with removeExternal(), remove parameters
- QObjectPtrList aUsedExternalObjects;
-
- QObjectPtrList::const_iterator anIt = myExternalObjects.begin(), aLast = myExternalObjects.end();
- for (; anIt != aLast; anIt++) {
- ObjectPtr anObject = *anIt;
- if (theIgnoreObjects.contains(anObject))
- aUsedExternalObjects.append(anObject);
- else
- removeExternalObject(anObject, theSketch, theFeature);
- }*/
- myExternalObjects.clear();
- //if (!aUsedExternalObjects.empty())
- // myExternalObjects = aUsedExternalObjects;
}
-//********************************************************************
-/*void PartSet_ExternalObjectsMgr::removeExternalValidated(const CompositeFeaturePtr& theSketch,
- const FeaturePtr& theFeature,
- ModuleBase_IWorkshop* theWorkshop)
-{
- // TODO(nds): unite with removeExternal(), remove parameters
- removeExternalObject(myExternalObjectValidated, theSketch, theFeature, theWorkshop);
- myExternalObjectValidated = ObjectPtr();
-}*/
-
void PartSet_ExternalObjectsMgr::removeExternalObject(const ObjectPtr& theObject,
- const CompositeFeaturePtr& theSketch,
+ const CompositeFeaturePtr& /*theSketch*/,
const FeaturePtr& theFeature,
ModuleBase_IWorkshop* theWorkshop)
{