#include <ModelAPI_Validator.h>
#include <ModelAPI_Session.h>
#include <ModelAPI_ResultCompSolid.h>
+#include <ModelAPI_Tools.h>
-#include <Events_Error.h>
+#include <Events_InfoMessage.h>
#include <Events_Loop.h>
#include <GeomAPI_IPresentable.h>
const TopoDS_Shape& aShape = anIter.Key();
aBuilder.Add(aComp, aShape);
// change deviation coefficient to provide more precise circle
+ // as there is no result, the shape is processed to correct deviation. To be unified
ModuleBase_Tools::setDefaultDeviationCoefficient(aShape, aDrawer);
if (myUseAISWidth) {
}
Set(aComp);
if (!aReadyToDisplay) {
- Events_Error::throwException("An empty AIS presentation: PartSet_OperationPrs");
+ Events_InfoMessage("PartSet_OperationPrs",
+ "An empty AIS presentation: PartSet_OperationPrs").send();
std::shared_ptr<Events_Message> aMsg = std::shared_ptr<Events_Message>(
new Events_Message(Events_Loop::eventByName(EVENT_EMPTY_OPERATION_PRESENTATION)));
Events_Loop::loop()->send(aMsg);
XGUI_Displayer* aDisplayer = XGUI_Tools::workshop(theWorkshop)->displayer();
- std::list<ResultPtr> aFeatureResults = theFeature->results();
- std::list<ResultPtr>::const_iterator aRIt = aFeatureResults.begin(),
- aRLast = aFeatureResults.end();
+ std::list<ResultPtr> aResults;
+ ModelAPI_Tools::allResults(theFeature, aResults);
+ std::list<ResultPtr>::const_iterator aRIt = aResults.begin(),
+ aRLast = aResults.end();
for (; aRIt != aRLast; aRIt++) {
ResultPtr aResult = *aRIt;
GeomShapePtr aGeomShape = aResult->shape();
theObjectShapes.clear();
QList<ModuleBase_ViewerPrsPtr> aValues;
- ModuleBase_IPropertyPanel* aPanel = theWorkshop->propertyPanel();
- if (aPanel) {
- ModuleBase_ModelWidget* aWidget = aPanel->activeWidget();
- if (aWidget) {
- aWidget->getHighlighted(aValues);
- }
- }
+ ModuleBase_ModelWidget* anActiveWidget = theWorkshop->module()->activeWidget();
+ if (anActiveWidget)
+ anActiveWidget->getHighlighted(aValues);
QList<GeomShapePtr> aShapes;
QList<ModuleBase_ViewerPrsPtr>::const_iterator anIIt = aValues.begin(),