#include <TColStd_MapOfTransient.hxx>
#include <TColStd_MapIteratorOfMapOfTransient.hxx>
+#include <Standard_Version.hxx>
#ifdef TINSPECTOR
#include <inspector/VInspectorAPI_CallBack.hxx>
void displayedObjects(const Handle(AIS_InteractiveContext)& theAIS, AIS_ListOfInteractive& theList)
{
// Get from null point
- theAIS->DisplayedObjects(theList, true);
+#if OCC_VERSION_HEX < 0x070400
+ theAIS->DisplayedObjects(theList, true);
+#else
+ theAIS->DisplayedObjects(theList);
+#endif
}
QString qIntListInfo(const QIntList& theValues, const QString& theSeparator = QString(", "))
//bool isCustomized = customizeObject(theObject);
int aDispMode = isShading? Shading : Wireframe;
- if (isShading)
- anAISIO->Attributes()->SetFaceBoundaryDraw( Standard_True );
anAISIO->SetDisplayMode(aDispMode);
aContext->Display(anAISIO, aDispMode, 0, false, true, AIS_DS_Displayed);
#ifdef TINSPECTOR
std::vector<int> aColor;
ModelAPI_Tools::getColor(aResult, aColor);
if (aColor.size() > 0) {
- aAISIO->SetColor(Quantity_Color(aColor[0] / 255., aColor[1] / 255., aColor[2] / 255., Quantity_TOC_RGB));
+ Quantity_Color
+ aCol(aColor[0] / 255., aColor[1] / 255., aColor[2] / 255., Quantity_TOC_RGB);
+ aAISIO->SetColor(aCol);
}
// Set deflection
double aDeflection = ModelAPI_Tools::getDeflection(aResult);
double aTransparency = ModelAPI_Tools::getTransparency(aResult);
if ((aTransparency >= 0) && (aTransparency != aAISObj->getTransparency()))
aAISObj->setTransparency(aTransparency);
+
+ // Set Iso-Lines
+ Handle(ModuleBase_ResultPrs) aResPrs = Handle(ModuleBase_ResultPrs)::DownCast(aAISIO);
+ if (!aResPrs.IsNull())
+ aResPrs->updateIsoLines();
}
myWorkshop->module()->storeSelection();
if (!theIO.IsNull()) {
anAISObj->setImpl(new Handle(AIS_InteractiveObject)(theIO));
}
- anObject = myWorkshop->module()->findPresentedObject(anAISObj);
+ if (myWorkshop->module())
+ anObject = myWorkshop->module()->findPresentedObject(anAISObj);
}
return anObject;
}
myContextId = aContext.get();
if (!myWorkshop->selectionActivate()->isTrihedronActive())
selectionActivate()->deactivateTrihedron(true);
- aContext->DefaultDrawer()->VIsoAspect()->SetNumber(0);
- aContext->DefaultDrawer()->UIsoAspect()->SetNumber(0);
+ // Do not modify default drawer. The same is done in ModuleBase_ResultPrs
+ //aContext->DefaultDrawer()->VIsoAspect()->SetNumber(0);
+ //aContext->DefaultDrawer()->UIsoAspect()->SetNumber(0);
//Handle(AIS_Trihedron) aTrihedron = myWorkshop->viewer()->trihedron();
//aTrihedron->getHighlightPointAspect()->SetScale(2.0);
//aTrihedron->getHighlightPointAspect()->SetTypeOfMarker(Aspect_TOM_O_STAR);
// Commented out according to discussion in bug #2825
- //ModuleBase_IViewer::DefaultHighlightDrawer = aContext->HighlightStyle();
+ ModuleBase_IViewer::DefaultHighlightDrawer = aContext->HighlightStyle();
//Handle(Prs3d_Drawer) aSelStyle = aContext->SelectionStyle();
//double aDeflection =
// QString(ModelAPI_ResultConstruction::DEFAULT_DEFLECTION().c_str()).toDouble();