#include <BRepBndLib.hxx>
#include <AIS_InteractiveObject.hxx>
+#include <AIS_InteractiveContext.hxx>
#include <AIS_LengthDimension.hxx>
#include <AIS_ParallelRelation.hxx>
#include <AIS_PerpendicularRelation.hxx>
}
}
+void GeomAPI_AISObject::redisplay()
+{
+ Handle(AIS_InteractiveObject) anAIS = impl<Handle(AIS_InteractiveObject)>();
+ if (!anAIS.IsNull()) {
+ Handle(AIS_InteractiveContext) aContext = anAIS->GetContext();
+ aContext->Redisplay(anAIS, false);
+ }
+}
void GeomAPI_AISObject::setColor(const int& theColor)
if (anAIS.IsNull())
return;
anAIS->SetWidth(theWidth);
+ anAIS->Redisplay();
}
void GeomAPI_AISObject::setColor(int theR, int theG, int theB)
}
}
}
+
+
+void GeomAPI_AISObject::setLineStyle(int theStyle)
+{
+ Handle(AIS_InteractiveObject) anAIS = impl<Handle(AIS_InteractiveObject)>();
+ if (!anAIS.IsNull()) {
+ Handle(AIS_Drawer) aDrawer = anAIS->Attributes();
+ if (aDrawer->HasLineAspect())
+ aDrawer->LineAspect()->SetTypeOfLine((Aspect_TypeOfLine)theStyle);
+ if (aDrawer->HasWireAspect())
+ aDrawer->WireAspect()->SetTypeOfLine((Aspect_TypeOfLine)theStyle);
+ }
+}
+
+
+void GeomAPI_AISObject::setTransparensy(double theVal)
+{
+ Handle(AIS_InteractiveObject) anAIS = impl<Handle(AIS_InteractiveObject)>();
+ if (!anAIS.IsNull()) {
+ Handle(AIS_InteractiveContext) aContext = anAIS->GetContext();
+ if (!aContext.IsNull())
+ aContext->SetTransparency(anAIS, theVal, false);
+ }
+}