* The method *PrsMgr_PresentationManager::Unhighlight()* taking Display Mode as an argument has been marked deprecated.
Implementation now performs unhighlighting of all highlighted presentation mode.
+@subsection upgrade_720_implicit_viewer_update Elimination of implicit 3D Viewer updates
+
+Most AIS_InteractiveContext methods are defined with a flag to update viewer immediatly or not.
+Within previous version of OCCT, this argument had default value TRUE.
+While immediate viewer updates are useful for beginners (the result is displayed as soon as possible),
+this approach is inefficent for batch viewer updates, and having default value as TRUE
+leaded to non-intended accidential updates which are difficult to find.
+
+To avoid such issues, the interface has been modified and default value has been removed.
+Therefore, old application code should be updated to set the flag theToUpdateViewer explicitly
+to desired value (TRUE to preserve old previous behavior), if it was not already set.
+
+The follow AIS_InteractiveContext methods have been changed:
+ Display, Erase, EraseAll, DisplayAll, EraseSelected, DisplaySelected, ClearPrs, Remove, RemoveAll, Hilight,
+ HilightWithColor, Unhilight, Redisplay, RecomputePrsOnly, Update, SetDisplayMode, UnsetDisplayMode, SetColor,
+ UnsetColor, SetWidth, UnsetWidth, SetMaterial, UnsetMaterial, SetTransparency, UnsetTransparency,
+ SetLocalAttributes, UnsetLocalAttributes, SetPolygonOffsets, SetTrihedronSize, SetPlaneSize, SetPlaneSize,
+ SetDeviationCoefficient, SetDeviationAngle, SetAngleAndDeviation, SetHLRDeviationCoefficient,
+ SetHLRDeviationAngle, SetHLRAngleAndDeviation, SetSelectedAspect, MoveTo, Select, ShiftSelect, SetSelected,
+ UpdateSelected, AddOrRemoveSelected, HilightSelected, UnhilightSelected, ClearSelected, ResetOriginalState,
+ SubIntensityOn, SubIntensityOff, FitSelected, EraseGlobal, ClearGlobal, ClearGlobalPrs.
+
@subsection upgrade_720_Result_Of_BOP_On_Containers Result of Boolean operations on containers
-* The result of Boolean operations on arguments of collection types (WIRE/SHELL/COMPSOLID) is now filtered from duplicating containers.
\ No newline at end of file
+* The result of Boolean operations on arguments of collection types (WIRE/SHELL/COMPSOLID) is now filtered from duplicating containers.
{
if (!myAISContext().IsNull())
{
- myAISContext()->Select(theX1, theY1, theX2, theY2, myView());
+ myAISContext()->Select (theX1, theY1, theX2, theY2, myView(), Standard_True);
}
}
{
if (!myAISContext().IsNull())
{
- myAISContext()->Select();
+ myAISContext()->Select (Standard_True);
}
}
{
if ((!myAISContext().IsNull()) && (!myView().IsNull()))
{
- myAISContext()->MoveTo(theX, theY, myView());
+ myAISContext()->MoveTo (theX, theY, myView(), Standard_True);
}
}
{
if ((!myAISContext().IsNull()) && (!myView().IsNull()))
{
- myAISContext()->ShiftSelect(theX1, theY1, theX2, theY2, myView());
+ myAISContext()->ShiftSelect (theX1, theY1, theX2, theY2, myView(), Standard_True);
}
}
{
if (!myAISContext().IsNull())
{
- myAISContext()->ShiftSelect();
+ myAISContext()->ShiftSelect (Standard_True);
}
}
aCurrentMode=AIS_Shaded;
}
- if(myAISContext()->NbCurrents()==0 || myAISContext()->NbSelected()==0)
+ if(myAISContext()->NbSelected()==0)
{
- myAISContext()->SetDisplayMode(aCurrentMode);
+ myAISContext()->SetDisplayMode (aCurrentMode, Standard_False);
}
else
{
- for(myAISContext()->InitCurrent(); myAISContext()->MoreCurrent(); myAISContext()->NextCurrent())
+ for(myAISContext()->InitSelected(); myAISContext()->MoreSelected(); myAISContext()->NextSelected())
{
- myAISContext()->SetDisplayMode(myAISContext()->Current(), theMode, Standard_False);
+ myAISContext()->SetDisplayMode (myAISContext()->SelectedInteractive(), theMode, Standard_False);
}
}
myAISContext()->UpdateCurrentViewer();
return;
}
Quantity_Color aCol = Quantity_Color(theR/255.,theG/255.,theB/255.,Quantity_TOC_RGB);
- for (;myAISContext()->MoreCurrent ();myAISContext()->NextCurrent ())
+ for (; myAISContext()->MoreSelected(); myAISContext()->NextSelected())
{
- myAISContext()->SetColor (myAISContext()->Current(),aCol.Name());
+ myAISContext()->SetColor (myAISContext()->SelectedInteractive(), aCol.Name(), Standard_False);
}
+ myAISContext()->UpdateCurrentViewer();
}
/// <summary>
theBlue=255;
Handle(AIS_InteractiveObject) aCurrent ;
Quantity_Color anObjCol;
- myAISContext()->InitCurrent();
- if (!myAISContext()->MoreCurrent())
+ myAISContext()->InitSelected();
+ if (!myAISContext()->MoreSelected())
{
return;
}
- aCurrent = myAISContext()->Current();
+ aCurrent = myAISContext()->SelectedInteractive();
if ( aCurrent->HasColor () )
{
- anObjCol = myAISContext()->Color(myAISContext()->Current());
+ anObjCol = myAISContext()->Color(aCurrent);
Quantity_Parameter r1, r2, r3;
anObjCol.Values(r1, r2, r3, Quantity_TOC_RGB);
theRed=(int)r1*255;
return;
}
- myAISContext()->EraseSelected (Standard_True);
- myAISContext()->ClearCurrents();
+ myAISContext()->EraseSelected (Standard_False);
+ myAISContext()->ClearSelected (Standard_True);
}
/// <summary>
{
return;
}
- for ( myAISContext()->InitCurrent(); myAISContext()->MoreCurrent (); myAISContext()->NextCurrent () )
+ for (myAISContext()->InitSelected(); myAISContext()->MoreSelected(); myAISContext()->NextSelected())
{
- myAISContext()->SetMaterial( myAISContext()->Current(), (Graphic3d_NameOfMaterial)theMaterial );
+ myAISContext()->SetMaterial (myAISContext()->SelectedInteractive(), (Graphic3d_NameOfMaterial)theMaterial, Standard_False);
}
myAISContext()->UpdateCurrentViewer();
}
{
return;
}
- for( myAISContext()->InitCurrent(); myAISContext()->MoreCurrent(); myAISContext()->NextSelected() )
+ for( myAISContext()->InitSelected(); myAISContext()->MoreSelected(); myAISContext()->NextSelected() )
{
- myAISContext()->SetTransparency( myAISContext()->Current(), ((Standard_Real)theTrans) / 10.0 );
+ myAISContext()->SetTransparency (myAISContext()->SelectedInteractive(), ((Standard_Real)theTrans) / 10.0, Standard_False);
}
+ myAISContext()->UpdateCurrentViewer();
}
/// <summary>
{
return false;
}
- myAISContext()->InitCurrent();
- return myAISContext()->MoreCurrent() != Standard_False;
+ myAISContext()->InitSelected();
+ return myAISContext()->MoreSelected() != Standard_False;
}
/// <summary>
int aMode = -1;
bool OneOrMoreInShading = false;
bool OneOrMoreInWireframe = false;
- for (myAISContext()->InitCurrent(); myAISContext()->MoreCurrent(); myAISContext()->NextCurrent())
+ for (myAISContext()->InitSelected(); myAISContext()->MoreSelected(); myAISContext()->NextSelected())
{
- if ( myAISContext()->IsDisplayed( myAISContext()->Current(), 1 ) )
+ if ( myAISContext()->IsDisplayed( myAISContext()->SelectedInteractive(), 1 ) )
{
OneOrMoreInShading = true;
}
- if ( myAISContext()->IsDisplayed( myAISContext()->Current(), 0 ) )
+ if ( myAISContext()->IsDisplayed( myAISContext()->SelectedInteractive(), 0 ) )
{
OneOrMoreInWireframe = true;
}
{
return false;
}
- if(myAISContext()->HasOpenedContext())
- {
- myAISContext()->CloseLocalContext();
- }
- myAISContext()->Display(new AIS_Shape(aShape));
+
+ myAISContext()->Display (new AIS_Shape (aShape), Standard_True);
return true;
}
for ( int i = 1; i <= aNbShap; i++ )
{
TopoDS_Shape aShape = aReader.Shape( i );
- myAISContext()->Display(new AIS_Shape(aShape));
+ myAISContext()->Display (new AIS_Shape (aShape), Standard_False);
}
+ myAISContext()->UpdateCurrentViewer();
}
}
}
{
aReader.TransferRoots();
TopoDS_Shape aShape = aReader.OneShape();
- myAISContext()->Display(new AIS_Shape(aShape));
+ myAISContext()->Display (new AIS_Shape (aShape), Standard_False);
}
else
{
/// <param name="theFileName">Name of export file</param>
bool ExportBRep(char* theFileName)
{
- myAISContext()->InitCurrent();
- if (!myAISContext()->MoreCurrent())
+ myAISContext()->InitSelected();
+ if (!myAISContext()->MoreSelected())
{
return false;
}
- Handle(AIS_InteractiveObject) anIO = myAISContext()->Current();
+ Handle(AIS_InteractiveObject) anIO = myAISContext()->SelectedInteractive();
Handle(AIS_Shape) anIS = Handle(AIS_Shape)::DownCast(anIO);
return BRepTools::Write (anIS->Shape(), (Standard_CString)theFileName) != Standard_False;
}
STEPControl_StepModelType aType = STEPControl_AsIs;
IFSelect_ReturnStatus aStatus;
STEPControl_Writer aWriter;
- for ( myAISContext()->InitCurrent(); myAISContext()->MoreCurrent(); myAISContext()->NextCurrent() )
+ for ( myAISContext()->InitSelected(); myAISContext()->MoreSelected(); myAISContext()->NextSelected() )
{
- Handle(AIS_InteractiveObject) anIO = myAISContext()->Current();
+ Handle(AIS_InteractiveObject) anIO = myAISContext()->SelectedInteractive();
Handle(AIS_Shape) anIS=Handle(AIS_Shape)::DownCast(anIO);
TopoDS_Shape aShape = anIS->Shape();
aStatus = aWriter.Transfer( aShape , aType );
IGESControl_Writer aWriter( Interface_Static::CVal( "XSTEP.iges.unit" ),
Interface_Static::IVal( "XSTEP.iges.writebrep.mode" ) );
- for ( myAISContext()->InitCurrent(); myAISContext()->MoreCurrent(); myAISContext()->NextCurrent() )
+ for ( myAISContext()->InitSelected(); myAISContext()->MoreSelected(); myAISContext()->NextSelected() )
{
- Handle(AIS_InteractiveObject) anIO = myAISContext()->Current();
+ Handle(AIS_InteractiveObject) anIO = myAISContext()->SelectedInteractive();
Handle(AIS_Shape) anIS=Handle(AIS_Shape)::DownCast(anIO);
TopoDS_Shape aShape = anIS->Shape();
aWriter.AddShape ( aShape );
BRep_Builder aBuilder;
aBuilder.MakeCompound( aRes );
- for ( myAISContext()->InitCurrent(); myAISContext()->MoreCurrent(); myAISContext()->NextCurrent() )
+ for ( myAISContext()->InitSelected(); myAISContext()->MoreSelected(); myAISContext()->NextSelected() )
{
- Handle(AIS_InteractiveObject) anIO = myAISContext()->Current();
+ Handle(AIS_InteractiveObject) anIO = myAISContext()->SelectedInteractive();
Handle(AIS_Shape) anIS=Handle(AIS_Shape)::DownCast(anIO);
TopoDS_Shape aShape = anIS->Shape();
if ( aShape.IsNull() )
BRep_Builder aBuilder;
aBuilder.MakeCompound( aComp );
- for ( myAISContext()->InitCurrent(); myAISContext()->MoreCurrent(); myAISContext()->NextCurrent() )
+ for ( myAISContext()->InitSelected(); myAISContext()->MoreSelected(); myAISContext()->NextSelected() )
{
- Handle(AIS_InteractiveObject) anIO = myAISContext()->Current();
+ Handle(AIS_InteractiveObject) anIO = myAISContext()->SelectedInteractive();
Handle(AIS_Shape) anIS=Handle(AIS_Shape)::DownCast(anIO);
TopoDS_Shape aShape = anIS->Shape();
if ( aShape.IsNull() )
{
if (!myAISContext().IsNull())
{
- myAISContext()->Select (theX1, theY1, theX2, theY2, myView());
+ myAISContext()->Select (theX1, theY1, theX2, theY2, myView(), Standard_True);
}
}
{
if (!myAISContext().IsNull())
{
- myAISContext()->Select();
+ myAISContext()->Select (Standard_True);
}
}
{
if (!myAISContext().IsNull() && !myView().IsNull())
{
- myAISContext()->MoveTo (theX, theY, myView());
+ myAISContext()->MoveTo (theX, theY, myView(), Standard_True);
}
}
{
if (!myAISContext().IsNull() && !myView().IsNull())
{
- myAISContext()->ShiftSelect (theX1, theY1, theX2, theY2, myView());
+ myAISContext()->ShiftSelect (theX1, theY1, theX2, theY2, myView(), Standard_True);
}
}
{
if (!myAISContext().IsNull())
{
- myAISContext()->ShiftSelect();
+ myAISContext()->ShiftSelect (Standard_True);
}
}
AIS_DisplayMode aCurrentMode = theMode == 0
? AIS_WireFrame
: AIS_Shaded;
- if (myAISContext()->NbCurrents() == 0
- || myAISContext()->NbSelected() == 0)
+ if (myAISContext()->NbSelected() == 0)
{
- myAISContext()->SetDisplayMode (aCurrentMode);
+ myAISContext()->SetDisplayMode (aCurrentMode, Standard_False);
}
else
{
- for (myAISContext()->InitCurrent(); myAISContext()->MoreCurrent(); myAISContext()->NextCurrent())
+ for (myAISContext()->InitSelected(); myAISContext()->MoreSelected(); myAISContext()->NextSelected())
{
- myAISContext()->SetDisplayMode (myAISContext()->Current(), theMode, Standard_False);
+ myAISContext()->SetDisplayMode (myAISContext()->SelectedInteractive(), theMode, Standard_False);
}
}
myAISContext()->UpdateCurrentViewer();
}
Quantity_Color aCol (theR / 255.0, theG / 255.0, theB / 255.0, Quantity_TOC_RGB);
- for (; myAISContext()->MoreCurrent(); myAISContext()->NextCurrent())
+ for (; myAISContext()->MoreSelected(); myAISContext()->NextSelected())
{
- myAISContext()->SetColor (myAISContext()->Current(), aCol.Name());
+ myAISContext()->SetColor (myAISContext()->SelectedInteractive(), aCol.Name(), false);
}
+ myAISContext()->UpdateCurrentViewer();
}
/// <summary>
theRed = 255;
theGreen = 255;
theBlue = 255;
- myAISContext()->InitCurrent();
- if (!myAISContext()->MoreCurrent())
+ myAISContext()->InitSelected();
+ if (!myAISContext()->MoreSelected())
{
return;
}
- Handle(AIS_InteractiveObject) aCurrent = myAISContext()->Current();
+ Handle(AIS_InteractiveObject) aCurrent = myAISContext()->SelectedInteractive();
if (aCurrent->HasColor())
{
- Quantity_Color anObjCol = myAISContext()->Color (myAISContext()->Current());
+ Quantity_Color anObjCol = myAISContext()->Color (aCurrent);
theRed = int(anObjCol.Red() * 255.0);
theGreen = int(anObjCol.Green() * 255.0);
theBlue = int(anObjCol.Blue() * 255.0);
return;
}
- myAISContext()->EraseSelected (Standard_True);
- myAISContext()->ClearCurrents();
+ myAISContext()->EraseSelected (Standard_False);
+ myAISContext()->ClearSelected (Standard_True);
}
/// <summary>
{
return;
}
- for (myAISContext()->InitCurrent(); myAISContext()->MoreCurrent(); myAISContext()->NextCurrent())
+ for (myAISContext()->InitSelected(); myAISContext()->MoreSelected(); myAISContext()->NextSelected())
{
- myAISContext()->SetMaterial (myAISContext()->Current(), (Graphic3d_NameOfMaterial )theMaterial);
+ myAISContext()->SetMaterial (myAISContext()->SelectedInteractive(), (Graphic3d_NameOfMaterial )theMaterial, Standard_False);
}
myAISContext()->UpdateCurrentViewer();
}
{
return;
}
- for (myAISContext()->InitCurrent(); myAISContext()->MoreCurrent(); myAISContext()->NextSelected())
+ for (myAISContext()->InitSelected(); myAISContext()->MoreSelected(); myAISContext()->NextSelected())
{
- myAISContext()->SetTransparency (myAISContext()->Current(), ((Standard_Real )theTrans) / 10.0);
+ myAISContext()->SetTransparency (myAISContext()->Current(), ((Standard_Real )theTrans) / 10.0, Standard_False);
}
+ myAISContext()->UpdateCurrentViewer();
}
/// <summary>
{
return false;
}
- myAISContext()->InitCurrent();
- return myAISContext()->MoreCurrent() != Standard_False;
+ myAISContext()->InitSelected();
+ return myAISContext()->MoreSelected() != Standard_False;
}
/// <summary>
bool isOneOrMoreInShading = false;
bool isOneOrMoreInWireframe = false;
- for (myAISContext()->InitCurrent(); myAISContext()->MoreCurrent(); myAISContext()->NextCurrent())
+ for (myAISContext()->InitSelected(); myAISContext()->MoreSelected(); myAISContext()->NextSelected())
{
- if (myAISContext()->IsDisplayed (myAISContext()->Current(), AIS_Shaded))
+ if (myAISContext()->IsDisplayed (myAISContext()->SelectedInteractive(), AIS_Shaded))
{
isOneOrMoreInShading = true;
}
- if (myAISContext()->IsDisplayed (myAISContext()->Current(), AIS_WireFrame))
+ if (myAISContext()->IsDisplayed (myAISContext()->SelectedInteractive(), AIS_WireFrame))
{
isOneOrMoreInWireframe = true;
}
{
return false;
}
- if (myAISContext()->HasOpenedContext())
- {
- myAISContext()->CloseLocalContext();
- }
+
Handle(AIS_Shape) aPrs = new AIS_Shape (aShape);
- myAISContext()->SetMaterial (aPrs, Graphic3d_NOM_GOLD);
+ myAISContext()->SetMaterial (aPrs, Graphic3d_NOM_GOLD, Standard_False);
myAISContext()->SetDisplayMode(aPrs, AIS_Shaded, Standard_False);
- myAISContext()->Display (aPrs);
+ myAISContext()->Display (aPrs, Standard_True);
return true;
}
{
for (int aShapeIter = 1; aShapeIter <= aNbShap; ++aShapeIter)
{
- myAISContext()->Display (new AIS_Shape (aReader.Shape (aShapeIter)), Standard_True);
+ myAISContext()->Display (new AIS_Shape (aReader.Shape (aShapeIter)), Standard_False);
}
+ myAISContext()->UpdateCurrentViewer();
}
}
return true;
/// <param name="theFileName">Name of export file</param>
bool ExportBRep (char* theFileName)
{
- myAISContext()->InitCurrent();
- if (!myAISContext()->MoreCurrent())
+ myAISContext()->InitSelected();
+ if (!myAISContext()->MoreSelected())
{
return false;
}
- Handle(AIS_Shape) anIS = Handle(AIS_Shape)::DownCast (myAISContext()->Current());
+ Handle(AIS_Shape) anIS = Handle(AIS_Shape)::DownCast (myAISContext()->SelectedInteractive());
return !anIS.IsNull()
&& BRepTools::Write (anIS->Shape(), theFileName);
}
{
STEPControl_StepModelType aType = STEPControl_AsIs;
STEPControl_Writer aWriter;
- for (myAISContext()->InitCurrent(); myAISContext()->MoreCurrent(); myAISContext()->NextCurrent())
+ for (myAISContext()->InitSelected(); myAISContext()->MoreSelected(); myAISContext()->NextSelected())
{
- Handle(AIS_Shape) anIS = Handle(AIS_Shape)::DownCast (myAISContext()->Current());
+ Handle(AIS_Shape) anIS = Handle(AIS_Shape)::DownCast (myAISContext()->SelectedInteractive());
if (anIS.IsNull())
{
return false;
IGESControl_Controller::Init();
IGESControl_Writer aWriter (Interface_Static::CVal ("XSTEP.iges.unit"),
Interface_Static::IVal ("XSTEP.iges.writebrep.mode"));
- for (myAISContext()->InitCurrent(); myAISContext()->MoreCurrent(); myAISContext()->NextCurrent())
+ for (myAISContext()->InitSelected(); myAISContext()->MoreSelected(); myAISContext()->NextSelected())
{
- Handle(AIS_Shape) anIS = Handle(AIS_Shape)::DownCast (myAISContext()->Current());
+ Handle(AIS_Shape) anIS = Handle(AIS_Shape)::DownCast (myAISContext()->SelectedInteractive());
if (anIS.IsNull())
{
return false;
TopoDS_Compound aRes;
BRep_Builder aBuilder;
aBuilder.MakeCompound (aRes);
- for (myAISContext()->InitCurrent(); myAISContext()->MoreCurrent(); myAISContext()->NextCurrent())
+ for (myAISContext()->InitSelected(); myAISContext()->MoreSelected(); myAISContext()->NextSelected())
{
- Handle(AIS_Shape) anIS = Handle(AIS_Shape)::DownCast (myAISContext()->Current());
+ Handle(AIS_Shape) anIS = Handle(AIS_Shape)::DownCast (myAISContext()->SelectedInteractive());
if (anIS.IsNull())
{
return false;
TopoDS_Compound aComp;
BRep_Builder aBuilder;
aBuilder.MakeCompound (aComp);
- for (myAISContext()->InitCurrent(); myAISContext()->MoreCurrent(); myAISContext()->NextCurrent())
+ for (myAISContext()->InitSelected(); myAISContext()->MoreSelected(); myAISContext()->NextSelected())
{
- Handle(AIS_Shape) anIS = Handle(AIS_Shape)::DownCast (myAISContext()->Current());
+ Handle(AIS_Shape) anIS = Handle(AIS_Shape)::DownCast (myAISContext()->SelectedInteractive());
if (anIS.IsNull())
{
return false;
{
if (aDisplayType == No2D3D )
{
- aDoc->GetAISContext()->EraseAll();
+ aDoc->GetAISContext()->EraseAll (Standard_True);
aDoc->Put3DOnTop();
}
if (aDisplayType == a2DNo3D)
{
- aDoc->GetISessionContext()->EraseAll();
+ aDoc->GetISessionContext()->EraseAll (Standard_True);
aDoc->Put2DOnTop();
}
if (aDisplayType == a2D3D)
{
- aDoc->GetAISContext()->EraseAll();
- aDoc->GetISessionContext()->EraseAll();
+ aDoc->GetAISContext()->EraseAll (Standard_True);
+ aDoc->GetISessionContext()->EraseAll (Standard_True);
aDoc->Put3DOnTop(false);
aDoc->Put2DOnTop(false);
Handle(Prs3d_Drawer) CurDrawer = aSurface->Attributes();
CurDrawer->UIsoAspect()->SetNumber(10);
CurDrawer->VIsoAspect()->SetNumber(10);
- aDoc->GetAISContext()->SetLocalAttributes(aSurface, CurDrawer);
+ aDoc->GetAISContext()->SetLocalAttributes(aSurface, CurDrawer, Standard_False);
aDoc->GetAISContext()->Display(aSurface, Standard_False);
if(NbResults>0)
}
Handle(ISession_Curve) aCurve = new ISession_Curve(SPL1);
- aDoc->GetAISContext()->SetDisplayMode(aCurve,1);
+ aDoc->GetAISContext()->SetDisplayMode(aCurve,1, Standard_False);
aDoc->GetAISContext()->Display(aCurve, Standard_False);
if (anInterpolation.IsDone())
{
Handle(ISession_Curve) aCurve2 = new ISession_Curve(SPL2);
- aDoc->GetAISContext()->SetDisplayMode(aCurve2,1);
+ aDoc->GetAISContext()->SetDisplayMode(aCurve2,1, Standard_False);
aDoc->GetAISContext()->Display(aCurve2, Standard_False);
}
Quantity_NameOfColor aNameOfColor= Quantity_NOC_GREEN;
Handle(ISession_Surface) aGraphicalSurface = new ISession_Surface(aSurf);
- aDoc->GetAISContext()->SetColor(aGraphicalSurface,aNameOfColor);
+ aDoc->GetAISContext()->SetColor (aGraphicalSurface, aNameOfColor, Standard_False);
aGraphicalSurface->Attributes()->FreeBoundaryAspect()->SetColor(aNameOfColor);
aGraphicalSurface->Attributes()->UIsoAspect()->SetColor(aNameOfColor);
aGraphicalSurface->Attributes()->VIsoAspect()->SetColor(aNameOfColor);
- aDoc->GetAISContext()->SetDisplayMode(aGraphicalSurface,1);
+ aDoc->GetAISContext()->SetDisplayMode (aGraphicalSurface, 1, Standard_False);
aDoc->GetAISContext()->Display(aGraphicalSurface,false);
// DisplaySurface(aDoc,aSurf,Quantity_NOC_GREEN);
//View is not updated automatically in ConvertToGrid
aView->Update();
}
- this->myAISContext2D->MoveTo(x, y, aView);
+ this->myAISContext2D->MoveTo (x, y, aView, Standard_True);
}
//-----------------------------------------------------------------------------------------
const Standard_Integer /*theMouseY*/,
const Handle(V3d_View)& /*theView*/)
{
- myAISContext->Select();
+ myAISContext->Select (Standard_True);
}
//-----------------------------------------------------------------------------------------
myCResultDialog.SetText(initfile);
return;
}
- myAISContext->SetDisplayMode(AIS_Shaded);
+ myAISContext->SetDisplayMode(AIS_Shaded, Standard_True);
simplify(aShape);
}
Fit();
}
else
- myAISContext->Display (aGraphicSurface);
+ myAISContext->Display (aGraphicSurface, Standard_True);
}
return aGraphicSurface;
myAISContext->SetColor (aGraphicPoint, theColor, toDisplay);
if (toDisplay)
{
- myAISContext->Display (aGraphicPoint);
+ myAISContext->Display (aGraphicPoint, Standard_True);
//COCCDemoDoc::Fit();
}
Fit();
}
else
- myAISContext->Display (aGraphicShape);
+ myAISContext->Display (aGraphicShape, Standard_True);
}
return aGraphicShape;
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Shape S = BRepPrimAPI_MakeWedge (60.,100.,80.,20.).Shape();
Handle(AIS_Shape) ais1 = new AIS_Shape(S);
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Shape S = BRepPrimAPI_MakeWedge(60.,100.,80.,20.).Shape();
Handle(AIS_Shape) ais1 = new AIS_Shape(S);
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Shape S = BRepPrimAPI_MakeWedge(60.,100.,80.,20.).Shape();
Handle(AIS_Shape) ais1 = new AIS_Shape(S);
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Shape S = BRepPrimAPI_MakeWedge(60.,100.,80.,20.).Shape();
Handle(AIS_Shape) ais1 = new AIS_Shape(S);
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Shape S = BRepPrimAPI_MakeWedge(6.,10.,8.,2.).Shape();
Handle(AIS_Shape) ais1 = new AIS_Shape(S);
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Shape S = BRepPrimAPI_MakeWedge(60., 100., 80., 20.).Shape();
Handle(AIS_Shape) ais1 = new AIS_Shape(S);
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Shape S = BRepPrimAPI_MakeWedge(60., 100., 80., 20.).Shape();
Handle(AIS_Shape) ais1 = new AIS_Shape(S);
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Shape B1 = BRepPrimAPI_MakeBox(200., 150., 100.).Shape();
Handle(AIS_Shape) aBox1 = new AIS_Shape(B1);
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Shape C1 = BRepPrimAPI_MakeCylinder(50., 200.).Shape();
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Shape C1 = BRepPrimAPI_MakeCone(50., 25., 200.).Shape();
Handle(AIS_Shape) ais1 = new AIS_Shape(C1);
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Shape S1 = BRepPrimAPI_MakeSphere(gp_Pnt(-200., -250., 0.), 80.).Shape();
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Shape S1 = BRepPrimAPI_MakeTorus(60., 20.).Shape();
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Shape S1 = BRepPrimAPI_MakeWedge(60., 100., 80., 20.).Shape();
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Vertex V1 = BRepBuilderAPI_MakeVertex(gp_Pnt(-200.,-200.,0.));
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Vertex V1 = BRepBuilderAPI_MakeVertex(gp_Pnt(-200.,-200.,0.));
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TColgp_Array1OfPnt CurvePoles(1,4);
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
gp_Circ c1 = gp_Circ(gp_Ax2(gp_Pnt(-100.,0.,-100.),gp_Dir(0.,0.,1.)),40.);
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
BRepBuilderAPI_MakePolygon P;
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Shape S = BRepPrimAPI_MakeBox(200., 300., 150.).Shape();
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Shape theBox = BRepPrimAPI_MakeBox(200, 60, 60).Shape();
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
gp_Pnt P(-5,5,-5);
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
gp_Ax2 axe(gp_Pnt(10,10,10),gp_Dir(1,2,1));
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Shape atorus = BRepPrimAPI_MakeTorus(120, 20).Shape();
section.Build();
Handle(AIS_Shape) asection=new AIS_Shape(section.Shape());
- myAISContext->SetDisplayMode(asection,0);
- myAISContext->SetColor(asection,Quantity_NOC_WHITE);
- myAISContext->Display(asection);
+ myAISContext->SetDisplayMode (asection, 0, Standard_False);
+ myAISContext->SetColor (asection, Quantity_NOC_WHITE, Standard_False);
+ myAISContext->Display (asection, Standard_False);
if(i<3) {
- myAISContext->Remove(theShape);
+ myAISContext->Remove (theShape, Standard_False);
}
}
+ myAISContext->UpdateCurrentViewer();
TCollection_AsciiString Message ("\
\n\
TopoDS_Shape atorus = BRepPrimAPI_MakeTorus(120,20); \n\
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Shape theTorus = BRepPrimAPI_MakeTorus(35, 8).Shape();
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Shape Box = BRepPrimAPI_MakeBox(gp_Pnt(-400,0,0),200,230,180).Shape();
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Shape theBox = BRepPrimAPI_MakeBox(200, 200, 200).Shape();
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Shape theBox = BRepPrimAPI_MakeBox(60,200,70).Shape();
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Shape S = BRepPrimAPI_MakeBox(400., 250., 300.).Shape();
Handle(AIS_Shape) ais1 = new AIS_Shape(S);
TopoDS_Shape res2 = MKP2.Shape();
ais1->Set(res2);
- myAISContext->Redisplay(ais1);
- myAISContext->SetSelected(anIO1,Standard_False);
+ myAISContext->Redisplay (ais1, Standard_False);
+ myAISContext->SetSelected (anIO1, Standard_False);
Fit();
TCollection_AsciiString Message ("\
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Shape S = BRepPrimAPI_MakeBox(400., 250., 300.).Shape();
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Shape S = BRepPrimAPI_MakeBox(400., 250., 300.).Shape();
TopoDS_Shape res1 = MKrev.Shape();
- myAISContext->Remove(ais1);
+ myAISContext->Remove (ais1, Standard_False);
Handle(AIS_Shape) ais2 = new AIS_Shape(res1);
myAISContext->Display(ais2,Standard_False);
const Handle(AIS_InteractiveObject)& anIO2 = ais2;
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Shape S1 = BRepPrimAPI_MakeBox(gp_Pnt(-500., -500., 0.), gp_Pnt(-100., -250., 300.)).Shape();
ais1->Set(res1);
- myAISContext->Redisplay(ais1);
+ myAISContext->Redisplay (ais1, Standard_False);
myAISContext->SetSelected(anIO1,Standard_False);
Fit();
Sleep(1000);
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Shape S = BRepPrimAPI_MakeBox(400., 250., 300.).Shape();
Handle(AIS_Shape) ais1 = new AIS_Shape(S);
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
BRepBuilderAPI_MakeWire mkw;
gp_Pnt p1 = gp_Pnt(0.,0.,0.);
TopoDS_Shape res = aform.Shape();
ais1->Set(res);
myAISContext->Redisplay(ais1,Standard_False);
- myAISContext->SetSelected(anIO1);
+ myAISContext->SetSelected (anIO1, Standard_False);
Fit();
TCollection_AsciiString Message ("\
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Shape S = BRepPrimAPI_MakeBox(gp_Pnt(-100, -60, -80), 150, 200, 170).Shape();
myAISContext->DisplayedObjects(L);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(L);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Shape S1 = BRepPrimAPI_MakeBox(150, 200, 110).Shape();
Handle(AIS_Shape) abox1 = new AIS_Shape(S1);
- myAISContext->SetColor(abox1,Quantity_NOC_WHITE);
+ myAISContext->SetColor (abox1, Quantity_NOC_WHITE, Standard_False);
myAISContext->SetMaterial(abox1,Graphic3d_NOM_PLASTIC,Standard_False);
myAISContext->Display(abox1,Standard_False);
const Handle(AIS_InteractiveObject)& anIOBox1 = abox1;
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Shape S1 = BRepPrimAPI_MakeBox(150, 200, 110).Shape();
TopoDS_Shape anOffsetShape2 = aShapeMaker2.Shape();
Handle(AIS_Shape) ais2 = new AIS_Shape(anOffsetShape2);
- myAISContext->SetColor(ais2,Quantity_NOC_MATRABLUE);
+ myAISContext->SetColor (ais2, Quantity_NOC_MATRABLUE, Standard_False);
myAISContext->SetMaterial(ais2,Graphic3d_NOM_GOLD,Standard_False);
- myAISContext->Display(ais2);
+ myAISContext->Display (ais2, Standard_False);
Fit();
TCollection_AsciiString Message ("\
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Vertex V1,V2,V3;
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Wire RedWire,YellowWire,WhiteWire,
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TColgp_Array2OfPnt Poles(1,2,1,4);
Handle(AIS_Shape) white = new AIS_Shape(WhiteFace);
- myAISContext->SetColor(white,Quantity_NOC_WHITE);
+ myAISContext->SetColor (white, Quantity_NOC_WHITE, Standard_False);
myAISContext->SetMaterial(white,Graphic3d_NOM_PLASTIC,Standard_False);
- myAISContext->SetTransparency(white,0.7);
+ myAISContext->SetTransparency (white, 0.7, Standard_False);
myAISContext->Display(white,Standard_False);
TopoDS_Shell aShell = BRepBuilderAPI_MakeShell(BSpline);
Handle(AIS_Shape) anAISShell = new AIS_Shape(aShell);
- myAISContext->SetDisplayMode(anAISShell,0);
+ myAISContext->SetDisplayMode (anAISShell, 0, Standard_False);
myAISContext->Display(anAISShell,Standard_False);
//myAISContext->SetSelected(anAISShell);
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
BRep_Builder builder;
builder.Add(Comp,aBox);
Handle(AIS_Shape) white = new AIS_Shape(Comp);
- myAISContext->SetDisplayMode(white,0);
+ myAISContext->SetDisplayMode (white, 0, Standard_False);
myAISContext->Display(white,Standard_False);
Fit();
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
gp_Pnt P(0,0,0);
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
//The tolerance is the tolerance of confusion
BRepTools::Write(Sol,"e://temp//solid");
Handle(AIS_Shape) borne = new AIS_Shape(Sol);
- myAISContext->SetDisplayMode(borne,1);
- myAISContext->SetColor(borne,Quantity_NOC_RED);
+ myAISContext->SetDisplayMode (borne, 1, Standard_False);
+ myAISContext->SetColor (borne, Quantity_NOC_RED, Standard_False);
myAISContext->SetMaterial(borne,Graphic3d_NOM_PLASTIC,Standard_False);
myAISContext->Display(borne,Standard_False);
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
//geometrie of a vertex
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Shape aBox = BRepPrimAPI_MakeBox(100, 100, 100).Shape();
j+=15;
}
//myAISContext->Erase(theBox,Standard_True,Standard_False);
- myAISContext->Remove(theBox);
+ myAISContext->Remove(theBox, Standard_False);
Fit();
Sleep (500);
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Shape S = BRepPrimAPI_MakeBox(200., 300., 150.).Shape();
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TColgp_Array1OfPnt Pnts1(1,3);
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
myAISContext->InitSelected();
if (myAISContext->MoreSelected()) {
AIS1 = Handle(AIS_Shape)::DownCast(myAISContext->SelectedInteractive());
- myAISContext->Unhilight(AIS1);
+ myAISContext->Unhilight (AIS1, Standard_True);
myAISContext->Activate(AIS1,2);
myState = SELECT_EDGE_PLATE;
((OCC_MainFrame*)AfxGetMainWnd())->SetStatusMessage("Select hole contour edges and then press right mouse button"); }
if(OnFileImportBrep_WithInitDir (L"HoleFilling") == 1)
return;
myAISContext->DisplayedObjects(LI);
- myAISContext->SetSelected(LI.First());
+ myAISContext->SetSelected(LI.First(), Standard_True);
OnButtonFill();
return;
}
MessageBoxW (AfxGetApp()->m_pMainWnd->m_hWnd, L"Error : The plate face is not valid!", L"CasCade Error", MB_ICONERROR);
myState = -1;
Handle(AIS_Shape) anAISShape = new AIS_Shape(aface);
- myAISContext->SetColor(anAISShape,Quantity_NOC_AZURE);
- myAISContext->SetMaterial(anAISShape,Graphic3d_NOM_SILVER);
- myAISContext->SetDisplayMode(anAISShape,1);
- myAISContext->Display(anAISShape);
- }
+ myAISContext->SetColor (anAISShape,Quantity_NOC_AZURE, Standard_False);
+ myAISContext->SetMaterial (anAISShape, Graphic3d_NOM_SILVER, Standard_False);
+ myAISContext->SetDisplayMode (anAISShape, 1, Standard_False);
+ myAISContext->Display (anAISShape, Standard_True);
+ }
}
void CModelingDoc::OnFillwithtang()
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
+ myAISContext->UpdateCurrentViewer();
return;
}
- myAISContext->SetSelected(aObject);
+ myAISContext->SetSelected(aObject, Standard_True);
}
myAISContext->InitSelected();
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove(aListIterator.Value(), Standard_False);
}
-
+ myAISContext->UpdateCurrentViewer();
return;
}
((OCC_MainFrame*)AfxGetMainWnd())->SetStatusMessage("");
myAISContext->DisplayedObjects(LI);
- myAISContext->SetSelected(LI.First());
+ myAISContext->SetSelected (LI.First(), Standard_True);
Sleep(700);
flag = 1;
OnFillwithtang();
const Standard_Integer /*y*/,
const Handle(V3d_View)& /*aView*/)
{
- myAISContext->Select();
+ myAISContext->Select (Standard_True);
if (myState == SELECT_EDGE_PLATE_TGTES_1) {
myAISContext->InitSelected();
if (myAISContext->MoreSelected()) {
if(aLI.Extent() == 2){
myState = SELECT_EDGE_PLATE_TGTES_2;
if (myAISContext->IsSelected(aLI.First()))
- myAISContext->SetSelected(aLI.Last());
+ myAISContext->SetSelected (aLI.Last(), Standard_True);
else
- myAISContext->SetSelected(aLI.First());
+ myAISContext->SetSelected (aLI.First(), Standard_True);
myAISContext->InitSelected();
Handle(AIS_Shape) ashape = Handle(AIS_Shape)::DownCast(myAISContext->SelectedInteractive());
THE_F2 = TopoDS::Face(ashape->Shape());
}
Handle(AIS_Shape) anAISShape=new AIS_Shape(theFace);
- myAISContext->SetColor(anAISShape,Quantity_NOC_BLUE1);
- myAISContext->SetMaterial(anAISShape,Graphic3d_NOM_SILVER);
- myAISContext->SetDisplayMode(anAISShape,1);
- myAISContext->Display(anAISShape);
+ myAISContext->SetColor (anAISShape, Quantity_NOC_BLUE1, Standard_False);
+ myAISContext->SetMaterial (anAISShape, Graphic3d_NOM_SILVER, Standard_False);
+ myAISContext->SetDisplayMode (anAISShape, 1, Standard_False);
+ myAISContext->Display (anAISShape, Standard_False);
myState = -1;
}
else
void CViewer2dDoc::OnBUTTONErase()
{
- myAISContext->EraseAll();
+ myAISContext->EraseAll (Standard_True);
}
void CViewer2dDoc::OnBUTTONTestText()
aDrawer->SetFaceBoundaryDraw(Standard_True);
aRect->SetAttributes(aDrawer);
- myAISContext->SetDisplayMode(aRect,1);
+ myAISContext->SetDisplayMode (aRect, 1, Standard_False);
myAISContext->SetColor(aRect,(Quantity_NameOfColor)(Quantity_NOC_CADETBLUE+2*i),Standard_False);
myAISContext->SetMaterial(aRect,Graphic3d_NOM_PLASTIC,Standard_False);
myAISContext->Display(aRect, Standard_False);
void CViewer2dDoc::OnBUTTONTestFace()
{
//erase all
- myAISContext->EraseAll();
+ myAISContext->EraseAll (Standard_True);
CFileDialog dlg(TRUE,
NULL,
TopoDS_Edge E14 = BRepBuilderAPI_MakeEdge(gp_Pnt(0.,68.,0.), gp_Pnt(40.,0.,0.));
TopoDS_Wire W1 = BRepBuilderAPI_MakeWire(E11,E12,E13,E14);
Handle(AIS_Shape) aRect1 = new AIS_Shape(W1);
- myAISContext->Display(aRect1);
- myAISContext->SetColor(aRect1,Quantity_NOC_YELLOW);
+ myAISContext->Display (aRect1, Standard_False);
+ myAISContext->SetColor (aRect1, Quantity_NOC_YELLOW, Standard_False);
//Second rectangle
TopoDS_Edge E21 = BRepBuilderAPI_MakeEdge(gp_Pnt(110.,0.,0.), gp_Pnt(152.5,25.,0.));
TopoDS_Edge E24 = BRepBuilderAPI_MakeEdge(gp_Pnt(70.,68.,0.), gp_Pnt(110.,0.,0.));
TopoDS_Wire W2 = BRepBuilderAPI_MakeWire(E21,E22,E23,E24);
Handle(AIS_Shape) aRect2 = new AIS_Shape(W2);
- myAISContext->Display(aRect2);
- myAISContext->SetColor(aRect2,Quantity_NOC_YELLOW);
+ myAISContext->Display (aRect2, Standard_False);
+ myAISContext->SetColor (aRect2, Quantity_NOC_YELLOW, Standard_False);
myAISContext->Activate(aRect2,2);
FitAll2DViews(Standard_True); // Update Viewer
TCollection_AsciiString aFileName ((const wchar_t* )aFilePath);
//erase viewer
- myAISContext->EraseAll();
+ myAISContext->EraseAll (Standard_False);
Handle(Sample2D_Image) anImage = new Sample2D_Image (aFileName);
anImage->SetCoord (40,50) ;
TCollection_AsciiString aFileName ((const wchar_t* )aFilePath);
//erase viewer
- myAISContext->EraseAll();
+ myAISContext->EraseAll (Standard_False);
//create images
{ // 1
if (m_ModelClippingONOFF)
{
myDoc->GetAISContext()->SetLocation (myShape, TopLoc_Location (myTrsf));
- myDoc->GetAISContext()->Redisplay (myShape);
+ myDoc->GetAISContext()->Redisplay (myShape, Standard_True);
myView->Update();
}
else
myClippingPlane->SetOn (Standard_True);
- myDoc->GetAISContext()->Display (myShape);
+ myDoc->GetAISContext()->Display (myShape, Standard_True);
}
UpdateData (FALSE);
if (m_ModelClippingONOFF)
{
myDoc->GetAISContext()->SetLocation (myShape, TopLoc_Location (myTrsf));
- myDoc->GetAISContext()->Redisplay (myShape);
+ myDoc->GetAISContext()->Redisplay (myShape, Standard_False);
myView->Update();
}
else
myClippingPlane->SetOn (Standard_True);
- myDoc->GetAISContext()->Display (myShape);
+ myDoc->GetAISContext()->Display (myShape, Standard_False);
}
else
{
// deactivate clipping plane
myClippingPlane->SetOn (Standard_False);
- myDoc->GetAISContext()->Remove (myShape);
+ myDoc->GetAISContext()->Remove (myShape, Standard_False);
}
myView->Update();
if (!myShape.IsNull())
{
- myDoc->GetAISContext()->Remove (myShape);
+ myDoc->GetAISContext()->Remove (myShape, Standard_False);
}
myView->Update();
{
if (!myShape.IsNull())
{
- myDoc->GetAISContext()->Remove (myShape);
+ myDoc->GetAISContext()->Remove (myShape, Standard_True);
}
CDialog::OnOK();
CViewer3dDoc::Fit();
}
else
- getAISContext()->Display (aGraphicSurface);
+ getAISContext()->Display (aGraphicSurface, Standard_True);
}
return aGraphicSurface;
CViewer3dDoc::Fit();
}
else
- getAISContext()->Display (aGraphicCurve);
+ getAISContext()->Display (aGraphicCurve, Standard_True);
}
return aGraphicCurve;
getAISContext()->SetColor (aGraphicPoint, theColor, toDisplay);
if (toDisplay) {
- getAISContext()->Display (aGraphicPoint);
+ getAISContext()->Display (aGraphicPoint, Standard_True);
//COCCDemoDoc::Fit();
}
CViewer3dDoc::Fit();
}
else
- getAISContext()->Display (aGraphicCurve);
+ getAISContext()->Display (aGraphicCurve, Standard_True);
}
return aGraphicCurve;
CViewer3dDoc::Fit();
}
else
- getAISContext()->Display (aGraphicShape);
+ getAISContext()->Display (aGraphicShape, Standard_True);
}
return aGraphicShape;
CViewer3dDoc::Fit();
}
else
- getAISContext()->Display (aGraphicShape);
+ getAISContext()->Display (aGraphicShape, Standard_True);
}
return aGraphicShape;
{
((CViewer3dApp*) AfxGetApp())->SetSampleName (L"Viewer3d");
((CViewer3dApp*) AfxGetApp())->SetSamplePath (L"..\\..\\04_Viewer3d");
- getAISContext()->EraseAll();
+ getAISContext()->EraseAll (Standard_True);
if (myIndex >=0 && myIndex < myNbSamples)
{
// turn lights on for terrain sample
aTransform.Perform(aFaces(1));
aShape = aTransform;
- getAISContext()->Display(Texturize(aShape, "terrain.gif"));
+ getAISContext()->Display (Texturize (aShape, "terrain.gif"), Standard_True);
}
myBox = new AIS_Shape(B.Shape());
- myAISContext->SetMaterial(myBox,Graphic3d_NOM_PEWTER);
- myAISContext->SetDisplayMode(myBox,1);
+ myAISContext->SetMaterial (myBox, Graphic3d_NOM_PEWTER, Standard_False);
+ myAISContext->SetDisplayMode (myBox, 1, Standard_False);
- myAISContext->Display(myBox);
+ myAISContext->Display (myBox, Standard_True);
TCollection_AsciiString Message("\
BRepPrimAPI_MakeBox Box1(gp_Pnt(0,-400,-100), 200.,150.,100.);\n\
");
gp_Ax2 CylAx2(gp_Pnt(0,0,-100), gp_Dir(gp_Vec(gp_Pnt(0,0,-100),gp_Pnt(0,0,100))));
myCylinder = new User_Cylinder(CylAx2, 80.,200.);
- myAISContext->SetDisplayMode(myCylinder,1);
+ myAISContext->SetDisplayMode (myCylinder, 1, Standard_False);
- myAISContext->Display(myCylinder);
+ myAISContext->Display (myCylinder, Standard_True);
TCollection_AsciiString Message("\
gp_Ax2 CylAx2(gp_Pnt(0,0,-100), gp_Dir(gp_Vec(gp_Pnt(0,0,-100),gp_Pnt(0,0,100))));\n\
mySphere = new AIS_Shape(S.Shape());
- myAISContext->SetMaterial(mySphere,Graphic3d_NOM_BRONZE);
- myAISContext->SetDisplayMode(mySphere,1);
+ myAISContext->SetMaterial (mySphere, Graphic3d_NOM_BRONZE, Standard_False);
+ myAISContext->SetDisplayMode (mySphere, 1, Standard_False);
- myAISContext->Display(mySphere);
+ myAISContext->Display (mySphere, Standard_False);
TCollection_AsciiString Message("\
BRepPrimAPI_MakeSphere S(gp_Pnt(0,300,0), 100.);\n\
");
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aListOfObjects);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
- myAISContext->Remove(myCylinder);
+ myAISContext->Remove (myCylinder, Standard_True);
myCylinder.Nullify();
myOverlappedBox = new AIS_Shape(aBoxShape2);
- myAISContext->SetMaterial(myOverlappedBox,Graphic3d_NOM_GOLD);
- myAISContext->SetDisplayMode(myOverlappedBox,1);
+ myAISContext->SetMaterial (myOverlappedBox, Graphic3d_NOM_GOLD, Standard_False);
+ myAISContext->SetDisplayMode (myOverlappedBox, 1, Standard_False);
- myAISContext->Display(myOverlappedBox);
+ myAISContext->Display (myOverlappedBox, Standard_True);
TCollection_AsciiString Message("\
BRepPrimAPI_MakeBox Box1(gp_Pnt(0,-400,-100), 200.,150.,100.);\n\
\n\
myOverlappedCylinder = new AIS_Shape(aCylShape2);
- myAISContext->SetMaterial(myOverlappedCylinder,Graphic3d_NOM_GOLD);
- myAISContext->SetDisplayMode(myOverlappedCylinder,1);
+ myAISContext->SetMaterial (myOverlappedCylinder, Graphic3d_NOM_GOLD, Standard_False);
+ myAISContext->SetDisplayMode (myOverlappedCylinder, 1, Standard_False);
- myAISContext->Display(myOverlappedCylinder);
+ myAISContext->Display (myOverlappedCylinder, Standard_True);
TCollection_AsciiString Message("\
gp_Ax2 CylAx2(gp_Pnt(0,0,-100), gp_Dir(gp_Vec(gp_Pnt(0,0,-100),gp_Pnt(0,0,100))));\n\
myOverlappedSphere = new AIS_Shape(aSphereShape2);
- myAISContext->SetMaterial(myOverlappedSphere,Graphic3d_NOM_GOLD);
+ myAISContext->SetMaterial (myOverlappedSphere, Graphic3d_NOM_GOLD, Standard_False);
- myAISContext->SetDisplayMode(myOverlappedSphere,1);
+ myAISContext->SetDisplayMode (myOverlappedSphere, 1, Standard_False);
- myAISContext->Display(myOverlappedSphere);
+ myAISContext->Display (myOverlappedSphere, Standard_True);
TCollection_AsciiString Message("\
BRepPrimAPI_MakeSphere Sphere1(gp_Pnt(0,300,0), 100.);\n\
Quantity_Color CSFColor;
COLORREF MSColor;
- myAISContext->Select();
+ myAISContext->Select (Standard_True);
// Change the color of a selected face in a user cylinder
if (myState == FACE_COLOR)
Handle(AIS_InteractiveObject) aSelectedObject = myAISContext->SelectedInteractive();
Handle(User_Cylinder)::DownCast (aSelectedObject)->SetColor (CSFColor.Name());
- myAISContext->Redisplay (aSelectedObject);
+ myAISContext->Redisplay (aSelectedObject, Standard_True);
myState = -1;
}
}
{
myAISContext->ClearPrs(myAISContext->SelectedInteractive(),6,Standard_False);
myAISContext->RecomputePrsOnly(myAISContext->SelectedInteractive(), Standard_False);
- myAISContext->SetDisplayMode(myAISContext->SelectedInteractive(), 6);
+ myAISContext->SetDisplayMode(myAISContext->SelectedInteractive(), 6, Standard_False);
}
+
+ myAISContext->UpdateCurrentViewer();
}
void CViewer3dDoc::OnUpdateObjectColoredMesh(CCmdUI* pCmdUI)
{
if (myAISContext -> IsDisplayed(myTrihedron))
{
- myAISContext->Remove(myTrihedron);
+ myAISContext->Remove(myTrihedron, Standard_True);
}
else
{
Handle(Geom_Axis2Placement) myTrihedronAxis=new Geom_Axis2Placement(gp::XOY());
myTrihedron=new AIS_Trihedron(myTrihedronAxis);
- myAISContext->SetTrihedronSize(200, Standard_True);
- myAISContext->Display(myTrihedron);
+ myAISContext->SetTrihedronSize(200, Standard_False);
+ myAISContext->Display(myTrihedron, Standard_True);
}
}
}
aSelInteractive ->Set (aNewShape);
- myAISContext->Redisplay (aSelInteractive);
+ myAISContext->Redisplay (aSelInteractive, Standard_True);
}
myCResultDialog.SetTitle("Make a fillet");
// Handle(AIS_Circle) anAISCirc = new AIS_Circle(C.Value());
Handle(AIS_Circle) anAISCirc = new AIS_Circle(aGeomCircle);
- myAISContext->Display (anAISCirc);
+ myAISContext->Display (anAISCirc, Standard_True);
myCResultDialog.SetTitle("Create a circle");
myCResultDialog.SetText(" GC_MakeCircle C(gp_Pnt(-100.,-300.,0.),gp_Pnt(-50.,-200.,0.),gp_Pnt(-10.,-250.,0.)); \n"
gp_Lin aGpLin (gp_Pnt (0., 0., 0.), gp_Dir(1., 0., 0.));
Handle(Geom_Line) aGeomLin = new Geom_Line (aGpLin);
Handle(AIS_Line) anAISLine = new AIS_Line (aGeomLin);
- myAISContext->Display (anAISLine);
+ myAISContext->Display (anAISLine, Standard_True);
myCResultDialog.SetTitle("Create a line");
myCResultDialog.SetText(" gp_Lin L(gp_Pnt(0.,0.,0.),gp_Dir(1.,0.,0.)); \n"
// (SDI documents will reuse this document)
SetTitle(myPresentation->GetName());
- myAISContext->EraseAll();
- myAISContext->SetDisplayMode(AIS_Shaded);
+ myAISContext->EraseAll (Standard_False);
+ myAISContext->SetDisplayMode(AIS_Shaded, Standard_True);
POSITION pos = GetFirstViewPosition();
while (pos != NULL)
void CViewer3dDoc::OnBUTTONStart()
{
- myAISContext->EraseAll();
+ myAISContext->EraseAll (Standard_True);
myPresentation->FirstSample();
DoSample();
}
void CViewer3dDoc::OnBUTTONEnd()
{
- myAISContext->EraseAll();
+ myAISContext->EraseAll (Standard_True);
myPresentation->LastSample();
DoSample();
}
BRepPrimAPI_MakeCone MakeCone(gp_Ax2(p1, gp_Dir(gp_Vec(p1, p2))),
0, (p1.Distance(p2))/tan(1.04), coneHeigth);
spotConeShape->Set(MakeCone.Solid());
- GetDocument()->GetAISContext()->Display(spotConeShape,0,-1);
+ GetDocument()->GetAISContext()->Display (spotConeShape, 0, -1, Standard_True);
((OCC_MainFrame*)AfxGetMainWnd())->SetStatusMessage("Pick the target point");
myCurrentMode = CurAction3d_TargetSpotLight;
}
break;
case CurAction3d_EndSpotLight :
- GetDocument()->GetAISContext()->Erase(spotConeShape);
+ GetDocument()->GetAISContext()->Erase (spotConeShape, Standard_True);
((OCC_MainFrame*)AfxGetMainWnd())->SetStatusMessage("Ready");
myCurrentMode = CurAction3d_Nothing;
break;
p2 = gp_Pnt(p1.X(),p1.Y(),p1.Z()+1.);
BRepBuilderAPI_MakeEdge MakeEdge(p1, p2);
directionalEdgeShape->Set(MakeEdge.Edge());
- GetDocument()->GetAISContext()->Display(directionalEdgeShape,0,-1);
+ GetDocument()->GetAISContext()->Display (directionalEdgeShape, 0, -1, Standard_True);
// Create a directional light
myCurrent_DirectionalLight = new V3d_DirectionalLight(myView->Viewer(), p1.X(),p1.Y(),p1.Z(),0.,0.,1.);
myView->SetLightOn(myCurrent_DirectionalLight);
}
break;
case CurAction3d_EndDirectionalLight:
- GetDocument()->GetAISContext()->Erase(directionalEdgeShape);
+ GetDocument()->GetAISContext()->Erase (directionalEdgeShape, Standard_True);
((OCC_MainFrame*)AfxGetMainWnd())->SetStatusMessage("Ready");
myCurrentMode = CurAction3d_Nothing;
break;
switch (myVisMode)
{
case VIS_WIREFRAME:
- GetDocument()->GetAISContext()->SetDisplayMode(AIS_WireFrame);
+ GetDocument()->GetAISContext()->SetDisplayMode (AIS_WireFrame, Standard_True);
myView->SetComputedMode (Standard_False);
break;
case VIS_SHADE:
- GetDocument()->GetAISContext()->SetDisplayMode(AIS_Shaded);
+ GetDocument()->GetAISContext()->SetDisplayMode (AIS_Shaded, Standard_True);
myView->SetComputedMode (Standard_False);
break;
case VIS_HLR:
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
myView->SetComputedMode (Standard_True);
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
- GetDocument()->GetAISContext()->SetDisplayMode(AIS_WireFrame);
+ GetDocument()->GetAISContext()->SetDisplayMode (AIS_WireFrame, Standard_True);
break;
}
}
for ( TopoDS_ListIteratorOfListOfShape iter(m_shapeList); iter.More(); iter.Next() )
{
Handle(AIS_Shape) ais = new AIS_Shape(iter.Value());
- anAIScontext->SetColor(ais, (Quantity_NameOfColor)m_colorMap.Find(iter.Value()));
- anAIScontext->SetMaterial(ais, Graphic3d_NOM_GOLD, Standard_False);
+ anAIScontext->SetColor(ais, (Quantity_NameOfColor)m_colorMap.Find(iter.Value()), Standard_False);
+ anAIScontext->SetMaterial(ais, Graphic3d_NOM_GOLD, Standard_False);
anAIScontext->Display(ais, Standard_False);
}
+ anAIScontext->UpdateCurrentViewer();
}
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
BRepPrimAPI_MakeBox B(200.,150.,100.);
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
BRepPrimAPI_MakeCylinder C(50.,200.);
Handle(AIS_InteractiveContext) CTX;
TPrsStd_AISViewer::Find(myOcafDoc->Main(), CTX);
- CTX->SetDisplayMode(AIS_Shaded);
+ CTX->SetDisplayMode (AIS_Shaded, Standard_True);
myAISContext=CTX;
// Set the maximum number of available "undo" actions
Handle(AIS_InteractiveContext) aContext;
TPrsStd_AISViewer::Find (myOcafDoc->Main(), aContext);
- aContext->SetDisplayMode (AIS_Shaded);
+ aContext->SetDisplayMode (AIS_Shaded, Standard_True);
myAISContext = aContext;
// Display the presentations (which was not stored in the document)
CTriangulationDoc::Fit();
}
else
- getAISContext()->Display (aGraphicSurface);
+ getAISContext()->Display (aGraphicSurface, Standard_True);
}
return aGraphicSurface;
CTriangulationDoc::Fit();
}
else
- getAISContext()->Display (aGraphicCurve);
+ getAISContext()->Display (aGraphicCurve, Standard_True);
}
return aGraphicCurve;
getAISContext()->SetColor (aGraphicPoint, theColor, toDisplay);
if (toDisplay) {
- getAISContext()->Display (aGraphicPoint);
+ getAISContext()->Display (aGraphicPoint, Standard_True);
//COCCDemoDoc::Fit();
}
CTriangulationDoc::Fit();
}
else
- getAISContext()->Display (aGraphicCurve);
+ getAISContext()->Display (aGraphicCurve, Standard_True);
}
return aGraphicCurve;
CTriangulationDoc::Fit();
}
else
- getAISContext()->Display (aGraphicShape);
+ getAISContext()->Display (aGraphicShape, Standard_True);
}
return aGraphicShape;
CTriangulationDoc::Fit();
}
else
- getAISContext()->Display (aGraphicShape);
+ getAISContext()->Display (aGraphicShape, Standard_True);
}
return aGraphicShape;
{
((CTriangulationApp*) AfxGetApp())->SetSampleName (L"Tesselate");
((CTriangulationApp*) AfxGetApp())->SetSamplePath (L"");
- getAISContext()->EraseAll();
+ getAISContext()->EraseAll (Standard_True);
if (myIndex >=0 && myIndex < myNbSamples)
sample (myFileNames[myIndex]);
}
}
}
- getAISContext()->EraseAll();
+ getAISContext()->EraseAll (Standard_False);
aShowShape = drawShape(aShape);
if(WAIT_A_SECOND) return;
aShowEdge = drawShape(aComp2,Quantity_NOC_GREEN);
- getAISContext()->Erase(aShowShape);
+ getAISContext()->Erase (aShowShape, Standard_True);
if(WAIT_A_SECOND) return;
}
}
if(aCount == aNumOfFace)
{
aShowFace = drawShape(aComp1,Quantity_NOC_GREEN);
- getAISContext()->Erase(aShowEdge);
+ getAISContext()->Erase (aShowEdge, Standard_True);
}
}
else
if(WAIT_A_SECOND) return;
drawShape(aCompound,Quantity_NOC_GREEN);
- getAISContext()->Erase(aShowFace);
+ getAISContext()->Erase (aShowFace, Standard_True);
}
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Shape theBox = BRepPrimAPI_MakeBox(200,60,60);
BRepMesh_IncrementalMesh(ShapeFused,1);
Handle (AIS_Shape) aSection = new AIS_Shape(ShapeFused);
- myAISContext->SetDisplayMode(aSection,1);
- myAISContext->SetColor(aSection,Quantity_NOC_RED);
- myAISContext->SetMaterial(aSection,Graphic3d_NOM_GOLD);
- myAISContext->Display(aSection);
+ myAISContext->SetDisplayMode (aSection, 1, Standard_False);
+ myAISContext->SetColor (aSection, Quantity_NOC_RED, Standard_False);
+ myAISContext->SetMaterial (aSection, Graphic3d_NOM_GOLD, Standard_False);
+ myAISContext->Display (aSection, Standard_False);
Standard_Integer result(0);
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Shape theBox = BRepPrimAPI_MakeBox(200,60,60).Shape();
BRepMesh_IncrementalMesh(ShapeFused,1);
Handle (AIS_Shape) aSection = new AIS_Shape(ShapeFused);
-myAISContext->SetDisplayMode(aSection,1);
-myAISContext->SetColor(aSection,Quantity_NOC_RED);
-myAISContext->SetMaterial(aSection,Graphic3d_NOM_GOLD);
-myAISContext->SetTransparency(aSection,0.1);
-myAISContext->Display(aSection);
+myAISContext->SetDisplayMode (aSection, 1, Standard_False);
+myAISContext->SetColor (aSection, Quantity_NOC_RED, Standard_False);
+myAISContext->SetMaterial (aSection, Graphic3d_NOM_GOLD, Standard_False);
+myAISContext->SetTransparency (aSection, 0.1, Standard_False);
+myAISContext->Display (aSection, Standard_False);
BRep_Builder builder;
TopoDS_Compound Comp;
}
}
Handle (AIS_Shape) atriangulation = new AIS_Shape(Comp);
-myAISContext->SetDisplayMode(atriangulation,0);
-myAISContext->SetColor(atriangulation,Quantity_NOC_WHITE);
-myAISContext->Display(atriangulation);
+myAISContext->SetDisplayMode (atriangulation, 0, Standard_False);
+myAISContext->SetColor (atriangulation, Quantity_NOC_WHITE, Standard_False);
+myAISContext->Display (atriangulation, Standard_False);
Fit();
myAISContext->DisplayedObjects(aList);
AIS_ListIteratorOfListOfInteractive aListIterator;
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
- myAISContext->Remove(aListIterator.Value());
+ myAISContext->Remove (aListIterator.Value(), Standard_False);
}
TopoDS_Shape theBox = BRepPrimAPI_MakeBox(200, 60, 60).Shape();
Handle (AIS_Shape) aSection = new AIS_Shape(ShapeFused);
-myAISContext->SetDisplayMode(aSection,1);
-myAISContext->SetColor(aSection,Quantity_NOC_RED);
-myAISContext->SetMaterial(aSection,Graphic3d_NOM_GOLD);
-myAISContext->Display(aSection);
+myAISContext->SetDisplayMode (aSection, 1, Standard_False);
+myAISContext->SetColor (aSection, Quantity_NOC_RED, Standard_False);
+myAISContext->SetMaterial (aSection, Graphic3d_NOM_GOLD, Standard_False);
+myAISContext->Display (aSection, Standard_False);
BRepTools::Clean(ShapeFused);
void CTriangulationDoc::OnBUTTONStart()
{
- myAISContext->EraseAll();
+ myAISContext->EraseAll (Standard_True);
myPresentation->FirstSample();
DoSample();
}
void CTriangulationDoc::OnBUTTONEnd()
{
- myAISContext->EraseAll();
+ myAISContext->EraseAll (Standard_True);
myPresentation->LastSample();
DoSample();
}
myAISContext->InitSelected();
}
- myAISContext->ClearSelected();
+ myAISContext->ClearSelected (Standard_True);
if (toUpdateDisplayable)
{
Handle(Geom_Axis2Placement) aTrihedronAxis = new Geom_Axis2Placement (gp::XOY());
myTrihedron = new AIS_Trihedron (aTrihedronAxis);
- myInteractiveContext->Display (myTrihedron);
+ myInteractiveContext->Display (myTrihedron, Standard_False);
myIsDisplayed = Standard_True;
}
if(isFit)
void CSelectionDialog::UpdateViews()
{
// Clear HLR dialog view
- myInteractiveContext->RemoveAll();
- myInteractiveContext->Display (myTrihedron);
+ myInteractiveContext->RemoveAll (Standard_False);
+ myInteractiveContext->Display (myTrihedron, Standard_False);
UpdateProjector();
if (!anAISShape.IsNull())
{
OneOrMoreFound = Standard_True;
- myInteractiveContext->Display (anAISShape);
+ myInteractiveContext->Display (anAISShape, Standard_False);
}
}
-
+ myInteractiveContext->UpdateCurrentViewer();
// Apply HLR to chosen shapes and display result into the 2d view.
Apply();
// Update viewer
myDisplayableShape->SetNbIsos (m_NbIsos);
// Clear HLR dialog view
- myInteractiveContext->RemoveAll();
- myInteractiveContext->Display (myTrihedron);
+ myInteractiveContext->RemoveAll (Standard_False);
+ myInteractiveContext->Display (myTrihedron, Standard_False);
Standard_Boolean OneOrMoreFound = Standard_False;
for (myDoc->GetAISContext()->InitSelected();
TopoDS_Shape aShape = anAISShape->Shape();
myDisplayableShape->Add (aShape);
Handle(AIS_Shape) aSelectedShape = new AIS_Shape (aShape);
- myInteractiveContext->Display (aSelectedShape);
+ myInteractiveContext->Display (aSelectedShape, Standard_False);
}
}
-
+ myInteractiveContext->UpdateCurrentViewer();
// Apply HLR to chosen shapes and display result into the 2d view.
Apply();
// Update viewer
void CSelectionDialog::Apply()
{
SetCursor(AfxGetApp()->LoadStandardCursor (IDC_WAIT));
- myDoc->GetInteractiveContext2D()->RemoveAll();
+ myDoc->GetInteractiveContext2D()->RemoveAll (Standard_False);
UpdateData (true);
Standard_Integer aDisplayMode = m_DisplayMode;
myAISContext->SetDeviationCoefficient(myDeviation);
myAisCylinderHead = new AIS_Shape (CylinderHead);
- myAISContext->SetColor (myAisCylinderHead, Quantity_NOC_WHITE);
- myAISContext->SetMaterial (myAisCylinderHead, Graphic3d_NOM_PLASTIC);
+ myAISContext->SetColor (myAisCylinderHead, Quantity_NOC_WHITE, Standard_False);
+ myAISContext->SetMaterial (myAisCylinderHead, Graphic3d_NOM_PLASTIC, Standard_False);
myAisEngineBlock = new AIS_Shape (EngineBlock);
- myAISContext->SetColor(myAisEngineBlock, Quantity_NOC_WHITE);
- myAISContext->SetMaterial(myAisEngineBlock,Graphic3d_NOM_PLASTIC);
+ myAISContext->SetColor(myAisEngineBlock, Quantity_NOC_WHITE, Standard_False);
+ myAISContext->SetMaterial(myAisEngineBlock,Graphic3d_NOM_PLASTIC, Standard_False);
myAISContext->Display(myAisCylinderHead ,1,-1,Standard_False,Standard_False);
myAISContext->Display(myAisEngineBlock ,1,-1,Standard_False,Standard_False);
myAisCrankArm = new AIS_Shape (CrankArm);
- myAISContext->SetColor (myAisCrankArm, Quantity_NOC_HOTPINK);
- myAISContext->SetMaterial(myAisCrankArm, Graphic3d_NOM_PLASTIC);
+ myAISContext->SetColor (myAisCrankArm, Quantity_NOC_HOTPINK, Standard_False);
+ myAISContext->SetMaterial(myAisCrankArm, Graphic3d_NOM_PLASTIC, Standard_False);
myAisPiston = new AIS_Shape (Piston);
- myAISContext->SetColor (myAisPiston , Quantity_NOC_WHITE);
- myAISContext->SetMaterial(myAisPiston , Graphic3d_NOM_PLASTIC);
+ myAISContext->SetColor (myAisPiston , Quantity_NOC_WHITE, Standard_False);
+ myAISContext->SetMaterial(myAisPiston , Graphic3d_NOM_PLASTIC, Standard_False);
myAisPropeller = new AIS_Shape (Propeller);
- myAISContext->SetColor (myAisPropeller, Quantity_NOC_RED);
- myAISContext->SetMaterial(myAisPropeller, Graphic3d_NOM_PLASTIC);
+ myAISContext->SetColor (myAisPropeller, Quantity_NOC_RED, Standard_False);
+ myAISContext->SetMaterial(myAisPropeller, Graphic3d_NOM_PLASTIC, Standard_False);
myAISContext->Display(myAisCrankArm ,1,-1,Standard_False,Standard_False);
myAISContext->Display(myAisPropeller ,1,-1,Standard_False,Standard_False);
}
if (TheState == 1)
- myAISContext->Select(theButtonDownX,theButtonDownY,x,y,aView);
+ myAISContext->Select (theButtonDownX, theButtonDownY, x, y, aView, Standard_True);
}
//-----------------------------------------------------------------------------------------
const Standard_Integer /*y*/,
const Handle(V3d_View)& /*aView*/ )
{
- myAISContext->Select();
+ myAISContext->Select (Standard_True);
}
//-----------------------------------------------------------------------------------------
const Standard_Integer y ,
const Handle(V3d_View)& aView )
{
- myAISContext->MoveTo(x,y,aView);
+ myAISContext->MoveTo (x, y, aView, Standard_True);
}
//-----------------------------------------------------------------------------------------
const Standard_Integer y ,
const Handle(V3d_View)& aView )
{
- myAISContext->MoveTo(x,y,aView);
+ myAISContext->MoveTo (x, y, aView, Standard_True);
}
//-----------------------------------------------------------------------------------------
}
if (TheState == 0)
- myAISContext->ShiftSelect(theButtonDownX,theButtonDownY,x,y,aView);
+ myAISContext->ShiftSelect (theButtonDownX, theButtonDownY, x, y, aView, Standard_True);
}
const Standard_Integer /*y*/,
const Handle(V3d_View)& /*aView*/)
{
- myAISContext->ShiftSelect();
+ myAISContext->ShiftSelect (Standard_True);
}
//-----------------------------------------------------------------------------------------
myAisPropeller->Set(Propeller);
myAISContext->Deactivate(myAisPropeller);
- myAISContext->Redisplay(myAisPropeller);
+ myAISContext->Redisplay (myAisPropeller, Standard_True);
}
((CAnimationView3D *)pCurrentView)->OnRestart();
}
myFace = aMkFace.Face();
// Remove all other shapes
- myAISContext->RemoveAll();
+ myAISContext->RemoveAll (Standard_False);
Handle(AIS_Shape) myAISSurface = new AIS_Shape(myFace);
{
((COCCDemoApp*) AfxGetApp())->SetSampleName (L"Convert");
((COCCDemoApp*) AfxGetApp())->SetSamplePath (L"..\\..\\10_Convert");
- getAISContext()->EraseAll();
+ getAISContext()->EraseAll (Standard_True);
if (myIndex >=0 && myIndex < myNbFuncs)
(this->*SampleFuncs[myIndex])();
}
//================================================================
void Convert_Presentation::sampleBezierSurface()
{
- getAISContext()->EraseAll();
+ getAISContext()->EraseAll (Standard_True);
Standard_CString aName = "BezierSurface";
// Create a BezierSurface
//================================================================
void Convert_Presentation::sampleCylindricalSurface()
{
- getAISContext()->EraseAll();
+ getAISContext()->EraseAll (Standard_True);
Standard_CString aName = "Cylindrical Surface";
TCollection_AsciiString aText (
TranslateView(-176.84682, -102.12892);
SetViewScale(0.69326);
- getAISContext()->EraseAll();
+ getAISContext()->EraseAll (Standard_True);
Standard_CString aName = "Surface of revolution";
TCollection_AsciiString aText (
//================================================================
void Convert_Presentation::sampleToroidalSurface()
{
- getAISContext()->EraseAll();
+ getAISContext()->EraseAll (Standard_True);
Standard_CString aName = "Toroidal surface";
TCollection_AsciiString aText (
//================================================================
void Convert_Presentation::sampleConicalSurface()
{
- getAISContext()->EraseAll();
+ getAISContext()->EraseAll (Standard_True);
Standard_CString aName = "Conical surface";
TCollection_AsciiString aText (
//================================================================
void Convert_Presentation::sampleSphericalSurface()
{
- getAISContext()->EraseAll();
+ getAISContext()->EraseAll (Standard_True);
Standard_CString aName = "Spherical surface";
TCollection_AsciiString aText (
COCCDemoDoc::Fit();
}
else
- getAISContext()->Display (aGraphicSurface);
+ getAISContext()->Display (aGraphicSurface, Standard_True);
}
return aGraphicSurface;
COCCDemoDoc::Fit();
}
else
- getAISContext()->Display (aGraphicCurve);
+ getAISContext()->Display (aGraphicCurve, Standard_True);
}
return aGraphicCurve;
getAISContext()->SetColor (aGraphicPoint, theColor, toDisplay);
if (toDisplay) {
- getAISContext()->Display (aGraphicPoint);
+ getAISContext()->Display (aGraphicPoint, Standard_True);
//COCCDemoDoc::Fit();
}
COCCDemoDoc::Fit();
}
else
- getAISContext()->Display (aGraphicCurve);
+ getAISContext()->Display (aGraphicCurve, Standard_True);
}
return aGraphicCurve;
COCCDemoDoc::Fit();
}
else
- getAISContext()->Display (aGraphicShape);
+ getAISContext()->Display (aGraphicShape, Standard_True);
}
return aGraphicShape;
COCCDemoDoc::Fit();
}
else
- getAISContext()->Display (aGraphicShape);
+ getAISContext()->Display (aGraphicShape, Standard_True);
}
return aGraphicShape;
// (SDI documents will reuse this document)
SetTitle(myPresentation->GetName());
- myAISContext->EraseAll();
- myAISContext->SetDisplayMode(AIS_Shaded);
+ myAISContext->EraseAll (Standard_False);
+ myAISContext->SetDisplayMode (AIS_Shaded, Standard_True);
POSITION pos = GetFirstViewPosition();
while (pos != NULL)
void COCCDemoDoc::OnBUTTONStart()
{
- myAISContext->EraseAll();
+ myAISContext->EraseAll (Standard_True);
myPresentation->FirstSample();
DoSample();
}
void COCCDemoDoc::OnBUTTONEnd()
{
- myAISContext->EraseAll();
+ myAISContext->EraseAll (Standard_True);
myPresentation->LastSample();
DoSample();
}
switch (myVisMode)
{
case VIS_WIREFRAME:
- GetDocument()->GetAISContext()->SetDisplayMode(AIS_WireFrame);
+ GetDocument()->GetAISContext()->SetDisplayMode (AIS_WireFrame, Standard_True);
myView->SetComputedMode (Standard_False);
break;
case VIS_SHADE:
- GetDocument()->GetAISContext()->SetDisplayMode(AIS_Shaded);
+ GetDocument()->GetAISContext()->SetDisplayMode (AIS_Shaded, Standard_True);
myView->SetComputedMode (Standard_False);
break;
case VIS_HLR:
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_WAIT));
myView->SetComputedMode (Standard_True);
SetCursor(AfxGetApp()->LoadStandardCursor(IDC_ARROW));
- GetDocument()->GetAISContext()->SetDisplayMode(AIS_WireFrame);
+ GetDocument()->GetAISContext()->SetDisplayMode (AIS_WireFrame, Standard_True);
break;
}
}
{
Standard_Real aTransparency;
for (myCurrentIC->InitSelected();myCurrentIC->MoreSelected ();myCurrentIC->NextSelected ()){
- aTransparency = myCurrentIC->SelectedInteractive()->Transparency();
- myCurrentIC->SetMaterial (myCurrentIC->SelectedInteractive(),(Graphic3d_NameOfMaterial)(Material));
- myCurrentIC->SetTransparency (myCurrentIC->SelectedInteractive(),aTransparency);
+ aTransparency = myCurrentIC->SelectedInteractive()->Transparency();
+ myCurrentIC->SetMaterial (myCurrentIC->SelectedInteractive(), (Graphic3d_NameOfMaterial)(Material), Standard_False);
+ myCurrentIC->SetTransparency (myCurrentIC->SelectedInteractive(), aTransparency, Standard_False);
}
+ myCurrentIC->UpdateCurrentViewer();
}
void CDialogMaterial::OnObjectMaterialAluminium () { SetMaterial ( Graphic3d_NOM_ALUMINIUM ) ; }
for (myCurrentIC->InitSelected();
myCurrentIC->MoreSelected ();
myCurrentIC->NextSelected ())
- {
- myCurrentIC->SetTransparency (myCurrentIC->SelectedInteractive(), temp);
- }
-
+ {
+ myCurrentIC->SetTransparency (myCurrentIC->SelectedInteractive(), temp, Standard_False);
+ }
+ myCurrentIC->UpdateCurrentViewer();
}
for (myCurrentIC->InitSelected();
myCurrentIC->MoreSelected ();
myCurrentIC->NextSelected())
- {
- myCurrentIC->SetTransparency (myCurrentIC->SelectedInteractive(), m_TransValue/10.0);
- }
-
+ {
+ myCurrentIC->SetTransparency (myCurrentIC->SelectedInteractive(), m_TransValue/10.0, Standard_False);
+ }
+ myCurrentIC->UpdateCurrentViewer();
*pResult = 0;
}
for (myCurrentIC->InitSelected();
myCurrentIC->MoreSelected ();
myCurrentIC->NextSelected())
- {
- myCurrentIC->SetTransparency (myCurrentIC->SelectedInteractive(), m_TransValue/10.0);
- }
+ {
+ myCurrentIC->SetTransparency (myCurrentIC->SelectedInteractive(), m_TransValue/10.0, Standard_False);
+ }
+ myCurrentIC->UpdateCurrentViewer();
}
else{
m_TransValue = temp;
}
myFirstVertex = TopoDS::Vertex (myAISContext->SelectedShape());
- myAISContext->ClearSelected();
+ myAISContext->ClearSelected (Standard_True);
}
//=======================================================================
mySecondVertex = TopoDS::Vertex (myAISContext->SelectedShape());
- myAISContext->ClearSelected();
+ myAISContext->ClearSelected (Standard_True);
}
//=======================================================================
}
myThirdVertex = TopoDS::Vertex (myAISContext->SelectedShape());
- myAISContext->ClearSelected();
+ myAISContext->ClearSelected (Standard_False);
//Build dimension here
TopoDS_Edge anEdge12 = BRepBuilderAPI_MakeEdge (myFirstVertex, mySecondVertex);
}
}
anAngleDim->SetDimensionAspect (anAspect);
- myAISContext->Display (anAngleDim);
+ myAISContext->Display (anAngleDim, Standard_True);
myAISContext->Activate (AIS_Shape::SelectionMode (TopAbs_VERTEX));
}
{
Handle(TopTools_HSequenceOfShape) aSequence = CImportExport::ReadIGES();
for(int i=1;i<= aSequence->Length();i++)
- anInteractiveContext->Display(new AIS_Shape(aSequence->Value(i)));
-
+ anInteractiveContext->Display (new AIS_Shape (aSequence->Value (i)), Standard_False);
+ anInteractiveContext->UpdateCurrentViewer();
}
Handle(TopTools_HSequenceOfShape) CImportExport::ReadIGES()// not by reference --> the sequence is created here !!
TopoDS_Shape aSelShape = myAISContext->SelectedShape();
const TopoDS_Edge& anEdge = TopoDS::Edge (aSelShape);
- myAISContext->ClearSelected();
+ myAISContext->ClearSelected (Standard_False);
TopoDS_Vertex aFirstVertex, aSecondVertex;
TopExp::Vertices (TopoDS::Edge (anEdge), aFirstVertex, aSecondVertex);
aLenDim->SetDimensionAspect (anAspect);
aLenDim->SetFlyout (aDimDlg->GetFlyout());
- myAISContext->Display (aLenDim);
+ myAISContext->Display (aLenDim, Standard_True);
myAISContext->Activate (AIS_Shape::SelectionMode (TopAbs_EDGE));
}
myFirstEdge = TopoDS::Edge (myAISContext->SelectedShape());
- myAISContext->ClearSelected();
+ myAISContext->ClearSelected (Standard_True);
}
//=======================================================================
mySecondEdge = TopoDS::Edge (myAISContext->SelectedShape());
- myAISContext->ClearSelected();
+ myAISContext->ClearSelected (Standard_True);
// Build plane through three points
BRepAdaptor_Curve aCurve1 (myFirstEdge);
}
anAngleDim->SetFlyout (aDimDlg->GetFlyout());
- myAISContext->Display (anAngleDim);
+ myAISContext->Display (anAngleDim, Standard_True);
}
else
{
aLenDim->SetDisplayUnits (aDimDlg->GetUnits());
}
- myAISContext->Display (aLenDim);
+ myAISContext->Display (aLenDim, Standard_True);
}
myAISContext->Activate (AIS_Shape::SelectionMode (TopAbs_EDGE));
myFirstVertex = TopoDS::Vertex (myAISContext->SelectedShape());
- myAISContext->ClearSelected();
+ myAISContext->ClearSelected (Standard_True);
}
//=======================================================================
}
mySecondVertex = TopoDS::Vertex (myAISContext->SelectedShape());
- myAISContext->ClearSelected();
+ myAISContext->ClearSelected (Standard_False);
//Build dimension here
gp_Pnt aP1=BRep_Tool::Pnt (myFirstVertex);
aLenDim->SetDimensionAspect (anAspect);
aLenDim->SetFlyout (aDimDlg->GetFlyout());
- myAISContext->Display (aLenDim);
+ myAISContext->Display (aLenDim, Standard_True);
myAISContext->Activate (AIS_Shape::SelectionMode (TopAbs_VERTEX));
}
const Standard_Integer theMouseY,
const Handle(V3d_View)& theView)
{
- myAISContext->MoveTo (theMouseX, theMouseY, theView);
+ myAISContext->MoveTo (theMouseX, theMouseY, theView, Standard_True);
}
void OCC_2dDoc::ShiftMoveEvent(const Standard_Integer theMouseX,
const Standard_Integer theMouseY,
const Handle(V3d_View)& theView)
{
- myAISContext->MoveTo (theMouseX, theMouseY, theView);
+ myAISContext->MoveTo (theMouseX, theMouseY, theView, Standard_True);
}
if (TheState == 0)
{
- ((OCC_2dDoc*)GetDocument())->GetInteractiveContext()->MoveTo(x,y,myV2dView);
- ((OCC_2dDoc*)GetDocument())->GetInteractiveContext()->Select(theButtonDownX,theButtonDownY,x,y,myV2dView);
+ ((OCC_2dDoc*)GetDocument())->GetInteractiveContext()->MoveTo (x, y, myV2dView, Standard_False);
+ ((OCC_2dDoc*)GetDocument())->GetInteractiveContext()->Select (theButtonDownX, theButtonDownY, x, y, myV2dView, Standard_True);
}
if (TheState == 1)
//View is not updated automatically in ConvertToGrid
myV2dView->Update();
}
- ((OCC_2dDoc*)GetDocument())->GetInteractiveContext()->MoveTo(x,y,myV2dView);
+ ((OCC_2dDoc*)GetDocument())->GetInteractiveContext()->MoveTo (x, y, myV2dView, Standard_True);
}
//-----------------------------------------------------------------------------------------
const Standard_Integer y)
{
// MultiMoveEvent2D means we move the mouse in a multi selection mode
-((OCC_2dDoc*)GetDocument())->GetInteractiveContext()->MoveTo(x,y,myV2dView);
+((OCC_2dDoc*)GetDocument())->GetInteractiveContext()->MoveTo (x, y, myV2dView, Standard_True);
}
//-----------------------------------------------------------------------------------------
if (TheState == 0)
{
- ((OCC_2dDoc*)GetDocument())->GetInteractiveContext()->MoveTo(x,y,myV2dView);
- ((OCC_2dDoc*)GetDocument())->GetInteractiveContext()->ShiftSelect(theButtonDownX,theButtonDownY,x,y,myV2dView);;
+ ((OCC_2dDoc*)GetDocument())->GetInteractiveContext()->MoveTo (x, y, myV2dView, Standard_False);
+ ((OCC_2dDoc*)GetDocument())->GetInteractiveContext()->ShiftSelect (theButtonDownX, theButtonDownY, x, y, myV2dView, Standard_True);
}
if (TheState == 1)
{
myAISContext->Select (aStartDragX, aStartDragY,
theMouseX, theMouseY,
- theView);
+ theView, Standard_True);
break;
}
};
const Standard_Integer theMouseY,
const Handle(V3d_View)& theView)
{
- myAISContext->MoveTo (theMouseX, theMouseY, theView);
- myAISContext->Select();
+ myAISContext->MoveTo (theMouseX, theMouseY, theView, Standard_False);
+ myAISContext->Select (Standard_True);
}
//-----------------------------------------------------------------------------------------
const Standard_Integer theMouseY,
const Handle(V3d_View)& theView)
{
- myAISContext->MoveTo (theMouseX, theMouseY, theView);
+ myAISContext->MoveTo (theMouseX, theMouseY, theView, Standard_True);
}
//-----------------------------------------------------------------------------------------
const Standard_Integer theMouseY,
const Handle(V3d_View)& theView)
{
- myAISContext->MoveTo (theMouseX, theMouseY, theView);
+ myAISContext->MoveTo (theMouseX, theMouseY, theView, Standard_True);
}
//-----------------------------------------------------------------------------------------
// button up
myAISContext->ShiftSelect (aStartDragX, aStartDragY,
theMouseX, theMouseY,
- theView);
+ theView, Standard_True);
}
}
const Standard_Integer /*theMouseY*/,
const Handle(V3d_View)& /*theView*/)
{
- myAISContext->ShiftSelect();
+ myAISContext->ShiftSelect (Standard_True);
}
//-----------------------------------------------------------------------------------------
CSFColor = Quantity_Color (GetRValue(MSColor)/255.,GetGValue(MSColor)/255.,
GetBValue(MSColor)/255.,Quantity_TOC_RGB);
for (;myAISContext->MoreSelected ();myAISContext->NextSelected ())
- myAISContext->SetColor (myAISContext->SelectedInteractive(),CSFColor.Name());
+ myAISContext->SetColor (myAISContext->SelectedInteractive(),CSFColor.Name(), Standard_False);
+ myAISContext->UpdateCurrentViewer();
}
}
void OCC_3dBaseDoc::OnUpdateObjectColor(CCmdUI* pCmdUI)
void OCC_3dBaseDoc::OnObjectErase()
{
- myAISContext->EraseSelected();
- myAISContext->ClearSelected();
+ myAISContext->EraseSelected (Standard_False);
+ myAISContext->ClearSelected (Standard_True);
}
void OCC_3dBaseDoc::OnUpdateObjectErase(CCmdUI* pCmdUI)
{
void OCC_3dBaseDoc::OnObjectWireframe()
{
for(myAISContext->InitSelected();myAISContext->MoreSelected();myAISContext->NextSelected())
- myAISContext->SetDisplayMode(myAISContext->SelectedInteractive(),0);
+ myAISContext->SetDisplayMode (myAISContext->SelectedInteractive(), 0, Standard_False);
+ myAISContext->UpdateCurrentViewer();
}
void OCC_3dBaseDoc::OnUpdateObjectWireframe(CCmdUI* pCmdUI)
{
void OCC_3dBaseDoc::OnObjectShading()
{
for(myAISContext->InitSelected();myAISContext->MoreSelected();myAISContext->NextSelected())
- myAISContext->SetDisplayMode(myAISContext->SelectedInteractive(),1);
+ myAISContext->SetDisplayMode (myAISContext->SelectedInteractive(), 1, Standard_False);
+ myAISContext->UpdateCurrentViewer();
}
void OCC_3dBaseDoc::OnUpdateObjectShading(CCmdUI* pCmdUI)
Standard_Real aTransparency;
for (myAISContext->InitSelected();myAISContext->MoreSelected ();myAISContext->NextSelected ()){
- aTransparency = myAISContext->SelectedInteractive()->Transparency();
- myAISContext->SetMaterial (myAISContext->SelectedInteractive(),(Graphic3d_NameOfMaterial)(nID-ID_OBJECT_MATERIAL_BRASS));
- myAISContext->SetTransparency (myAISContext->SelectedInteractive(),aTransparency);
+ aTransparency = myAISContext->SelectedInteractive()->Transparency();
+ myAISContext->SetMaterial (myAISContext->SelectedInteractive(),(Graphic3d_NameOfMaterial)(nID-ID_OBJECT_MATERIAL_BRASS), Standard_False);
+ myAISContext->SetTransparency (myAISContext->SelectedInteractive(),aTransparency, Standard_False);
}
+ myAISContext->UpdateCurrentViewer();
return true;
}
void OCC_3dBaseDoc::OnObjectDisplayall()
{
- myAISContext->DisplayAll();
+ myAISContext->DisplayAll (Standard_True);
}
void OCC_3dBaseDoc::OnUpdateObjectDisplayall(CCmdUI* pCmdUI)
{
for (myAISContext->InitSelected();myAISContext->MoreSelected ();myAISContext->NextSelected ())
myAISContext->SetMaterial (myAISContext->SelectedInteractive(),
- (Graphic3d_NameOfMaterial)(Material));
+ (Graphic3d_NameOfMaterial)(Material), Standard_False);
+ myAISContext->UpdateCurrentViewer();
}
myFirstFace = TopoDS::Face (myAISContext->SelectedShape());
- myAISContext->ClearSelected();
+ myAISContext->ClearSelected (Standard_True);
}
void CParamsFacesPage::OnBnClickedFacesbtn2()
}
mySecondFace = TopoDS::Face (myAISContext->SelectedShape());
- myAISContext->ClearSelected();
+ myAISContext->ClearSelected (Standard_False);
CDimensionDlg *aDimDlg = (CDimensionDlg*)(GetParentOwner());
}
anAngleDim->SetFlyout (aDimDlg->GetFlyout());
- myAISContext->Display (anAngleDim);
+ myAISContext->Display (anAngleDim, Standard_True);
}
else
{
aLenDim->SetDisplayUnits (aDimDlg->GetUnits());
}
- myAISContext->Display (aLenDim);
+ myAISContext->Display (aLenDim, Standard_True);
}
myAISContext->Activate (aSelectionMode);
}
}
- myAISContext->ClearSelected();
+ myAISContext->ClearSelected (Standard_False);
CDimensionDlg *aDimDlg = (CDimensionDlg*)(this->GetParentOwner());
// Try to create dimension if it is possible
Handle(AIS_Dimension) aDim;
// Display dimension in the neutral point
- myAISContext->Display (aDim);
+ myAISContext->Display (aDim, Standard_True);
myAISContext->Activate (AIS_Shape::SelectionMode (TopAbs_EDGE));
}
Quantity_Color color( aRetColor.red() / 255., aRetColor.green() / 255.,
aRetColor.blue() / 255., Quantity_TOC_RGB );
for (; myContext->MoreSelected(); myContext->NextSelected() )
- myContext->SetColor( myContext->SelectedInteractive(), color.Name() );
+ myContext->SetColor( myContext->SelectedInteractive(), color.Name(), Standard_False);
+ myContext->UpdateCurrentViewer();
}
}
void DocumentCommon::onMaterial( int theMaterial )
{
for ( myContext->InitSelected(); myContext->MoreSelected (); myContext->NextSelected () )
- myContext->SetMaterial( myContext->SelectedInteractive(), (Graphic3d_NameOfMaterial)theMaterial );
+ myContext->SetMaterial( myContext->SelectedInteractive(), (Graphic3d_NameOfMaterial)theMaterial, Standard_False);
+ myContext->UpdateCurrentViewer();
}
void DocumentCommon::onMaterial()
void DocumentCommon::onTransparency( int theTrans )
{
for( myContext->InitSelected(); myContext->MoreSelected(); myContext->NextSelected() )
- myContext->SetTransparency( myContext->SelectedInteractive(), ((Standard_Real)theTrans) / 10.0 );
+ myContext->SetTransparency (myContext->SelectedInteractive(), ((Standard_Real)theTrans) / 10.0, Standard_False);
+ myContext->UpdateCurrentViewer();
}
void DocumentCommon::onTransparency()
void DocumentCommon::onDelete()
{
myContext->EraseSelected (Standard_False);
- myContext->ClearSelected();
+ myContext->ClearSelected (Standard_False);
myContext->UpdateCurrentViewer();
getApplication()->onSelectionChanged();
}
if ( TheState == 1 )
{
- myContext->Select( theButtonDownX, theButtonDownY, x, y, myView );
+ myContext->Select( theButtonDownX, theButtonDownY, x, y, myView, Standard_True );
emit selectionChanged();
}
}
void View::InputEvent( const int /*x*/, const int /*y*/ )
{
- myContext->Select();
+ myContext->Select (Standard_True);
emit selectionChanged();
}
void View::MoveEvent( const int x, const int y )
{
- myContext->MoveTo( x, y, myView );
+ myContext->MoveTo( x, y, myView, Standard_True );
}
void View::MultiMoveEvent( const int x, const int y )
{
- myContext->MoveTo( x, y, myView );
+ myContext->MoveTo( x, y, myView, Standard_True );
}
void View::MultiDragEvent( const int x, const int y, const int TheState )
}
if ( TheState == 0 )
{
- myContext->ShiftSelect( theButtonDownX, theButtonDownY, x, y, myView );
+ myContext->ShiftSelect( theButtonDownX, theButtonDownY, x, y, myView, Standard_True );
emit selectionChanged();
}
}
void View::MultiInputEvent( const int /*x*/, const int /*y*/ )
{
- myContext->ShiftSelect();
+ myContext->ShiftSelect (Standard_True);
emit selectionChanged();
}
QApplication::setOverrideCursor( Qt::WaitCursor );
TopoDS_Shape aBottle=MakeBottle(50,70,30);
Handle(AIS_Shape) AISBottle=new AIS_Shape(aBottle);
- getContext()->SetMaterial(AISBottle,Graphic3d_NOM_GOLD);
- getContext()->SetDisplayMode(AISBottle,1,Standard_False);
+ getContext()->SetMaterial (AISBottle, Graphic3d_NOM_GOLD, Standard_False);
+ getContext()->SetDisplayMode(AISBottle, 1, Standard_False);
getContext()->Display(AISBottle, Standard_False);
const Handle(AIS_InteractiveObject)& anIOAISBottle = AISBottle;
getContext()->SetSelected(anIOAISBottle,Standard_False);
//purpose :
//=======================================================================
void AIS_InteractiveContext::SetSelectedAspect (const Handle(Prs3d_BasicAspect)& theAspect,
- const Standard_Boolean ,
const Standard_Boolean theToUpdateViewer)
{
if (HasOpenedContext())
//=======================================================================
void AIS_InteractiveContext::SetPlaneSize(const Standard_Real theValX,
const Standard_Real theValY,
- const Standard_Boolean /*updateviewer*/)
+ const Standard_Boolean theToUpdateViewer)
{
myDefaultDrawer->PlaneAspect()->SetPlaneLength (theValX, theValY);
- Redisplay (AIS_KOI_Datum, 7);
+ Redisplay (AIS_KOI_Datum, 7, theToUpdateViewer);
}
//=======================================================================
return;
}
+//=======================================================================
+//function : FitSelected
+//purpose : Fits the view corresponding to the bounds of selected objects
+//=======================================================================
+void AIS_InteractiveContext::FitSelected (const Handle(V3d_View)& theView)
+{
+ FitSelected (theView, 0.01, Standard_True);
+}
+
//=======================================================================
//function : FitSelected
//purpose : Fits the view corresponding to the bounds of selected objects
//! open or closed. If you want to view the object in open
//! local context without selection, use the syntax below,
//! setting aSelectionMode to -1.
- Standard_EXPORT void Display (const Handle(AIS_InteractiveObject)& anIobj, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void Display (const Handle(AIS_InteractiveObject)& theIObj,
+ const Standard_Boolean theToUpdateViewer);
//! Controls the choice between the using the display
//! and selection modes of open local context which you
//! - vertices: 1
//! - edges: 2
//! - wires: 3.
- Standard_EXPORT void Display (const Handle(AIS_InteractiveObject)& theIObj, const Standard_Integer theDispMode, const Standard_Integer theSelectionMode, const Standard_Boolean theToUpdateViewer = Standard_True, const Standard_Boolean theToAllowDecomposition = Standard_True, const AIS_DisplayStatus theDispStatus = AIS_DS_None);
+ Standard_EXPORT void Display (const Handle(AIS_InteractiveObject)& theIObj,
+ const Standard_Integer theDispMode,
+ const Standard_Integer theSelectionMode,
+ const Standard_Boolean theToUpdateViewer,
+ const Standard_Boolean theToAllowDecomposition = Standard_True,
+ const AIS_DisplayStatus theDispStatus = AIS_DS_None);
//! Allows you to load the Interactive Object aniobj
//! with a given selection mode SelectionMode, and/or
//! Hides the object. The object's presentations are simply
//! flagged as invisible and therefore excluded from redrawing.
//! To show hidden objects, use Display().
- Standard_EXPORT void Erase (const Handle(AIS_InteractiveObject)& aniobj, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void Erase (const Handle(AIS_InteractiveObject)& theIObj,
+ const Standard_Boolean theToUpdateViewer);
//! Hides all objects. The object's presentations are simply
//! flagged as invisible and therefore excluded from redrawing.
//! To show all hidden objects, use DisplayAll().
- Standard_EXPORT void EraseAll (const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void EraseAll (const Standard_Boolean theToUpdateViewer);
//! Displays all hidden objects.
- Standard_EXPORT void DisplayAll (const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void DisplayAll (const Standard_Boolean theToUpdateViewer);
//! Hides selected objects. The object's presentations are simply
//! flagged as invisible and therefore excluded from redrawing.
//! To show hidden objects, use Display().
- Standard_EXPORT void EraseSelected (const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void EraseSelected (const Standard_Boolean theToUpdateViewer);
//! Displays selected objects if a local context is open.
//! Displays current objects if there is no active local context.
//! Standard_False, the presentation of the Interactive
//! Object activates the selection mode; the object is
//! displayed but no viewer will be updated.
- Standard_EXPORT void DisplaySelected (const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void DisplaySelected (const Standard_Boolean theToUpdateViewer);
//! Changes the status of a temporary object. It will be
//! kept at the neutral point, i.e. put in the list of
//! Warning
//! Removes anIobj. anIobj is still active if it was
//! previously activated.
- Standard_EXPORT void ClearPrs (const Handle(AIS_InteractiveObject)& aniobj, const Standard_Integer aMode = 0, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void ClearPrs (const Handle(AIS_InteractiveObject)& theIObj,
+ const Standard_Integer theMode,
+ const Standard_Boolean theToUpdateViewer);
//! Removes aniobj from every viewer. aniobj is no
//! longer referenced in the Context.
//! Standard_False, the presentation of the Interactive
//! Object activates the selection mode; the object is
//! displayed but no viewer will be updated.
- Standard_EXPORT void Remove (const Handle(AIS_InteractiveObject)& aniobj, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void Remove (const Handle(AIS_InteractiveObject)& theIObj,
+ const Standard_Boolean theToUpdateViewer);
//! Removes all the objects from all opened Local Contexts
//! and from the Neutral Point
- Standard_EXPORT void RemoveAll (const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void RemoveAll (const Standard_Boolean theToUpdateViewer);
//! Updates the display in the viewer to take dynamic
//! detection into account. On dynamic detection by the
//! Object activates the selection mode; the object is
//! displayed but no viewer will be updated.
Standard_DEPRECATED("Deprecated method Hilight()")
- void Hilight (const Handle(AIS_InteractiveObject)& theObj, const Standard_Boolean theIsToUpdateViewer = Standard_True)
+ void Hilight (const Handle(AIS_InteractiveObject)& theObj,
+ const Standard_Boolean theIsToUpdateViewer)
{
return HilightWithColor (theObj, myStyles[Prs3d_TypeOfHighlight_Dynamic], theIsToUpdateViewer);
}
//! Object activates the selection mode; the object is
//! displayed but no viewer will be updated.
Standard_EXPORT void HilightWithColor (const Handle(AIS_InteractiveObject)& theObj,
- const Handle(Prs3d_Drawer)& theStyle,
- const Standard_Boolean theIsToUpdate = Standard_True);
+ const Handle(Prs3d_Drawer)& theStyle,
+ const Standard_Boolean theToUpdateViewer);
//! Removes hilighting from the entity aniobj. Updates the viewer.
//! Standard_False, the presentation of the Interactive
//! Object activates the selection mode; the object is
//! displayed but no viewer will be updated.
- Standard_EXPORT void Unhilight (const Handle(AIS_InteractiveObject)& aniobj, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void Unhilight (const Handle(AIS_InteractiveObject)& theIObj,
+ const Standard_Boolean theToUpdateViewer);
//! Sets the display priority aPriority of the seen parts
//! presentation of the entity anIobj.
//! Standard_False, the presentation of the Interactive
//! Object activates the selection mode; the object is
//! displayed but no viewer will be updated.
- Standard_EXPORT void Redisplay (const Handle(AIS_InteractiveObject)& aniobj, const Standard_Boolean updateviewer = Standard_True, const Standard_Boolean allmodes = Standard_False);
+ Standard_EXPORT void Redisplay (const Handle(AIS_InteractiveObject)& theIObj,
+ const Standard_Boolean theToUpdateViewer,
+ const Standard_Boolean theAllModes = Standard_False);
//! Recomputes the Prs/Selection of displayed objects of
//! a given type and a given signature.
//! if signature = -1 doesnt take signature criterion.
- Standard_EXPORT void Redisplay (const AIS_KindOfInteractive aTypeOfObject, const Standard_Integer Signature = -1, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void Redisplay (const AIS_KindOfInteractive theTypeOfObject,
+ const Standard_Integer theSignature,
+ const Standard_Boolean theToUpdateViewer);
//! Recomputes the displayed presentations, flags the others
//! Doesn't update presentations
- Standard_EXPORT void RecomputePrsOnly (const Handle(AIS_InteractiveObject)& anIobj, const Standard_Boolean updateviewer = Standard_True, const Standard_Boolean allmodes = Standard_False);
+ Standard_EXPORT void RecomputePrsOnly (const Handle(AIS_InteractiveObject)& theIObj,
+ const Standard_Boolean theToUpdateViewer,
+ const Standard_Boolean theAllModes = Standard_False);
//! Recomputes the active selections, flags the others
//! Doesn't update presentations
//! and selection structures. This method does not force any
//! recomputation on its own. The method recomputes selections
//! even if they are loaded without activation in particular selector.
- Standard_EXPORT void Update (const Handle(AIS_InteractiveObject)& theIObj, const Standard_Boolean theUpdateViewer = Standard_True);
+ Standard_EXPORT void Update (const Handle(AIS_InteractiveObject)& theIObj,
+ const Standard_Boolean theUpdateViewer);
//! Sets the display mode of seen Interactive Objects.
//! object is displayed but no viewer will be updated.
//! Note that display mode 3 is only used if you have an
//! AIS_Textured Shape.
- Standard_EXPORT void SetDisplayMode (const Handle(AIS_InteractiveObject)& aniobj, const Standard_Integer aMode, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void SetDisplayMode (const Handle(AIS_InteractiveObject)& theIObj,
+ const Standard_Integer theMode,
+ const Standard_Boolean theToUpdateViewer);
//! Unsets the display mode of seen Interactive Objects.
//! Standard_False, the presentation of the Interactive
//! Object returns to the default selection mode; the
//! object is displayed but no viewer will be updated.
- Standard_EXPORT void UnsetDisplayMode (const Handle(AIS_InteractiveObject)& aniobj, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void UnsetDisplayMode (const Handle(AIS_InteractiveObject)& theIObj,
+ const Standard_Boolean theToUpdateViewer);
//! Disables the mechanism of adaptive tolerance calculation in SelectMgr_ViewerSelector and
//! sets the given tolerance for ALL sensitive entities activated. For more information, see
//! applying both on the front and back face.
Standard_EXPORT void SetCurrentFacingModel (const Handle(AIS_InteractiveObject)& aniobj, const Aspect_TypeOfFacingModel aModel = Aspect_TOFM_BOTH_SIDE);
- Standard_EXPORT void SetColor (const Handle(AIS_InteractiveObject)& aniobj, const Quantity_NameOfColor aColor, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void SetColor (const Handle(AIS_InteractiveObject)& theIObj,
+ const Quantity_NameOfColor theColor,
+ const Standard_Boolean theToUpdateViewer);
//! Sets the color of the selected entity.
//! Standard_False, the presentation of the Interactive
//! Object activates the selection mode; the object is
//! displayed but no viewer will be updated.
- Standard_EXPORT void SetColor (const Handle(AIS_InteractiveObject)& aniobj, const Quantity_Color& aColor, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void SetColor (const Handle(AIS_InteractiveObject)& theIObj,
+ const Quantity_Color& theColor,
+ const Standard_Boolean theToUpdateViewer);
//! Removes the color selection for the selected entity.
//! If a local context is open and if updateviewer equals
//! Standard_False, the presentation of the Interactive
//! Object activates the selection mode; the object is
//! displayed but no viewer will be updated.
- Standard_EXPORT void UnsetColor (const Handle(AIS_InteractiveObject)& aniobj, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void UnsetColor (const Handle(AIS_InteractiveObject)& theIObj,
+ const Standard_Boolean theToUpdateViewer);
//! Sets the width of the entity aniobj.
//! Standard_False, the presentation of the Interactive
//! Object activates the selection mode; the object is
//! displayed but no viewer will be updated.
- Standard_EXPORT virtual void SetWidth (const Handle(AIS_InteractiveObject)& aniobj, const Standard_Real aValue, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT virtual void SetWidth (const Handle(AIS_InteractiveObject)& theIObj,
+ const Standard_Real theValue,
+ const Standard_Boolean theToUpdateViewer);
//! Removes the width setting of the entity aniobj.
//! Standard_False, the presentation of the Interactive
//! Object activates the selection mode; the object is
//! displayed but no viewer will be updated.
- Standard_EXPORT virtual void UnsetWidth (const Handle(AIS_InteractiveObject)& aniobj, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT virtual void UnsetWidth (const Handle(AIS_InteractiveObject)& theIObj,
+ const Standard_Boolean theToUpdateViewer);
//! Provides the type of material setting for the view of
//! Standard_False, the presentation of the Interactive
//! Object activates the selection mode; the object is
//! displayed but no viewer will be updated.
- Standard_EXPORT void SetMaterial (const Handle(AIS_InteractiveObject)& aniobj, const Graphic3d_NameOfMaterial aName, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void SetMaterial (const Handle(AIS_InteractiveObject)& theIObj,
+ const Graphic3d_NameOfMaterial theName,
+ const Standard_Boolean theToUpdateViewer);
//! Removes the type of material setting for viewing the
//! Standard_False, the presentation of the Interactive
//! Object activates the selection mode; the object is
//! displayed but no viewer will be updated.
- Standard_EXPORT void UnsetMaterial (const Handle(AIS_InteractiveObject)& anObj, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void UnsetMaterial (const Handle(AIS_InteractiveObject)& theIObj,
+ const Standard_Boolean theToUpdateViewer);
//! Provides the transparency settings for viewing the
//! entity aniobj. The transparency value aValue may be
//! Standard_False, the presentation of the Interactive
//! Object activates the selection mode; the object is
//! displayed but no viewer will be updated.
- Standard_EXPORT void SetTransparency (const Handle(AIS_InteractiveObject)& aniobj, const Standard_Real aValue = 0.6, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void SetTransparency (const Handle(AIS_InteractiveObject)& theIObj,
+ const Standard_Real theValue,
+ const Standard_Boolean theToUpdateViewer);
//! Removes the transparency settings for viewing the
//! Standard_False, the presentation of the Interactive
//! Object activates the selection mode; the object is
//! displayed but no viewer will be updated.
- Standard_EXPORT void UnsetTransparency (const Handle(AIS_InteractiveObject)& aniobj, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void UnsetTransparency (const Handle(AIS_InteractiveObject)& theIObj,
+ const Standard_Boolean theToUpdateViewer);
//! Sets the attributes of the interactive object aniobj by
//! Standard_False, the presentation of the Interactive
//! Object activates the selection mode; the object is
//! displayed but no viewer will be updated.
- Standard_EXPORT void SetLocalAttributes (const Handle(AIS_InteractiveObject)& aniobj, const Handle(Prs3d_Drawer)& aDrawer, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void SetLocalAttributes (const Handle(AIS_InteractiveObject)& theIObj,
+ const Handle(Prs3d_Drawer)& theDrawer,
+ const Standard_Boolean theToUpdateViewer);
//! Removes the settings for local attributes of the entity
//! Standard_False, the presentation of the Interactive
//! Object activates the selection mode; the object is
//! displayed but no viewer will be updated.
- Standard_EXPORT void UnsetLocalAttributes (const Handle(AIS_InteractiveObject)& anObj, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void UnsetLocalAttributes (const Handle(AIS_InteractiveObject)& theIObj,
+ const Standard_Boolean theToUpdateViewer);
//! Sets up polygon offsets for the given AIS_InteractiveObject.
//! It simply calls anObj->SetPolygonOffsets()
- Standard_EXPORT void SetPolygonOffsets (const Handle(AIS_InteractiveObject)& anObj, const Standard_Integer aMode, const Standard_ShortReal aFactor = 1.0, const Standard_ShortReal aUnits = 0.0, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void SetPolygonOffsets (const Handle(AIS_InteractiveObject)& theIObj,
+ const Standard_Integer theMode,
+ const Standard_ShortReal theFactor,
+ const Standard_ShortReal theUnits,
+ const Standard_Boolean theToUpdateViewer);
//! simply calls anObj->HasPolygonOffsets()
Standard_EXPORT Standard_Boolean HasPolygonOffsets (const Handle(AIS_InteractiveObject)& anObj) const;
//! Standard_False, the presentation of the Interactive
//! Object activates the selection mode; the object is
//! displayed but no viewer will be updated.
- Standard_EXPORT void SetTrihedronSize (const Standard_Real aSize, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void SetTrihedronSize (const Standard_Real theSize,
+ const Standard_Boolean theToUpdateViewer);
//! returns the current value of trihedron size.
Standard_EXPORT Standard_Real TrihedronSize() const;
//! Standard_False, the presentation of the Interactive
//! Object activates the selection mode; the object is
//! displayed but no viewer will be updated.
- Standard_EXPORT void SetPlaneSize (const Standard_Real aSizeX, const Standard_Real aSizeY, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void SetPlaneSize (const Standard_Real theSizeX,
+ const Standard_Real theSizeY,
+ const Standard_Boolean theToUpdateViewer);
//! Sets the plane size aSize.
//! Object activates the selection mode; the object is
//! displayed but no viewer will be updated.
//! May be used if PlaneSize returns true.
- Standard_EXPORT void SetPlaneSize (const Standard_Real aSize, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void SetPlaneSize (const Standard_Real theSize,
+ const Standard_Boolean theToUpdateViewer);
//! Returns true if the length in the X direction XSize is
//! the same as that in the Y direction YSize.
//! object is displayed but no viewer will be updated.
//! Note that display mode 3 is only used if you have an
//! AIS_Textured Shape.
- Standard_EXPORT void SetDisplayMode (const Standard_Integer AMode, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void SetDisplayMode (const Standard_Integer theMode,
+ const Standard_Boolean theToUpdateViewer);
//! Sets the deviation coefficient aCoefficient.
//! for a relative deviation. This deviation will be:
//! SizeOfObject * DeviationCoefficient.
//! default 0.001
- Standard_EXPORT void SetDeviationCoefficient (const Handle(AIS_InteractiveObject)& aniobj, const Standard_Real aCoefficient, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void SetDeviationCoefficient (const Handle(AIS_InteractiveObject)& theIObj,
+ const Standard_Real theCoefficient,
+ const Standard_Boolean theToUpdateViewer);
- Standard_EXPORT void SetDeviationAngle (const Handle(AIS_InteractiveObject)& aniobj, const Standard_Real anAngle, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void SetDeviationAngle (const Handle(AIS_InteractiveObject)& theIObj,
+ const Standard_Real theAngle,
+ const Standard_Boolean theToUpdateViewer);
//! Calls the AIS_Shape SetAngleAndDeviation to set
//! both Angle and Deviation coefficients
- Standard_EXPORT void SetAngleAndDeviation (const Handle(AIS_InteractiveObject)& aniobj, const Standard_Real anAngle, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void SetAngleAndDeviation (const Handle(AIS_InteractiveObject)& theIObj,
+ const Standard_Real theAngle,
+ const Standard_Boolean theToUpdateViewer);
//! Sets the deviation coefficient aCoefficient for
//! removal of hidden lines created by different
//! viewpoints in different presentations. The Default value is 0.02.
- Standard_EXPORT void SetHLRDeviationCoefficient (const Handle(AIS_InteractiveObject)& aniobj, const Standard_Real aCoefficient, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void SetHLRDeviationCoefficient (const Handle(AIS_InteractiveObject)& theIObj,
+ const Standard_Real theCoefficient,
+ const Standard_Boolean theToUpdateViewer);
- Standard_EXPORT void SetHLRDeviationAngle (const Handle(AIS_InteractiveObject)& aniobj, const Standard_Real anAngle, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void SetHLRDeviationAngle (const Handle(AIS_InteractiveObject)& theIObj,
+ const Standard_Real theAngle,
+ const Standard_Boolean theToUpdateViewer);
//! Computes a HLRAngle and a
//! HLRDeviationCoefficient by means of the angle
//! anAngle and sets the corresponding methods in the
//! default drawing tool with these values.
- Standard_EXPORT void SetHLRAngleAndDeviation (const Handle(AIS_InteractiveObject)& aniobj, const Standard_Real anAngle, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void SetHLRAngleAndDeviation (const Handle(AIS_InteractiveObject)& theIObj,
+ const Standard_Real theAngle,
+ const Standard_Boolean theToUpdateViewer);
//! Sets the deviation coefficient aCoefficient.
//! Drawings of curves or patches are made with respect
//! ALL selected objects.
//! Flag globalChange has no effect (left to simplify porting).
//! Updates the viewer when <updateViewer> is TRUE
- Standard_EXPORT void SetSelectedAspect (const Handle(Prs3d_BasicAspect)& anAspect, const Standard_Boolean globalChange = Standard_True, const Standard_Boolean updateViewer = Standard_True);
+ Standard_EXPORT void SetSelectedAspect (const Handle(Prs3d_BasicAspect)& theAspect,
+ const Standard_Boolean theToUpdateViewer);
//! Relays mouse position in pixels theXPix and theYPix to the interactive context selectors.
//! This is done by the view theView passing this position to the main viewer and updating it.
//! Functions in both Neutral Point and local contexts.
//! If theToRedrawOnUpdate is set to false, callee should call RedrawImmediate() to highlight detected object.
- Standard_EXPORT AIS_StatusOfDetection MoveTo (const Standard_Integer theXPix, const Standard_Integer theYPix, const Handle(V3d_View)& theView, const Standard_Boolean theToRedrawOnUpdate = Standard_True);
+ Standard_EXPORT AIS_StatusOfDetection MoveTo (const Standard_Integer theXPix,
+ const Standard_Integer theYPix,
+ const Handle(V3d_View)& theView,
+ const Standard_Boolean theToRedrawOnUpdate);
//! returns True if other entities were detected in the
//! last mouse detection
//! YPMin, XPMax, and YPMax in the view, aView
//! The objects detected are passed to the main viewer,
//! which is then updated.
- Standard_EXPORT AIS_StatusOfPick Select (const Standard_Integer XPMin, const Standard_Integer YPMin, const Standard_Integer XPMax, const Standard_Integer YPMax, const Handle(V3d_View)& aView, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT AIS_StatusOfPick Select (const Standard_Integer theXPMin,
+ const Standard_Integer theYPMin,
+ const Standard_Integer theXPMax,
+ const Standard_Integer theYPMax,
+ const Handle(V3d_View)& theView,
+ const Standard_Boolean theToUpdateViewer);
//! polyline selection; clears the previous picked list
- Standard_EXPORT AIS_StatusOfPick Select (const TColgp_Array1OfPnt2d& Polyline, const Handle(V3d_View)& aView, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT AIS_StatusOfPick Select (const TColgp_Array1OfPnt2d& thePolyline,
+ const Handle(V3d_View)& theView,
+ const Standard_Boolean theToUpdateViewer);
//! Stores and hilights the previous detected; Unhilights
//! the previous picked.
- Standard_EXPORT AIS_StatusOfPick Select (const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT AIS_StatusOfPick Select (const Standard_Boolean theToUpdateViewer);
//! adds the last detected to the list of previous picked.
//! if the last detected was already declared as picked,
//! removes it from the Picked List.
- Standard_EXPORT AIS_StatusOfPick ShiftSelect (const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT AIS_StatusOfPick ShiftSelect (const Standard_Boolean theToUpdateViewer);
//! adds the last detected to the list of previous picked.
//! if the last detected was already declared as picked,
//! removes it from the Picked List.
- Standard_EXPORT AIS_StatusOfPick ShiftSelect (const TColgp_Array1OfPnt2d& Polyline, const Handle(V3d_View)& aView, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT AIS_StatusOfPick ShiftSelect (const TColgp_Array1OfPnt2d& thePolyline,
+ const Handle(V3d_View)& theView,
+ const Standard_Boolean theToUpdateViewer);
//! rectangle of selection ; adds new detected entities into the
//! picked list, removes the detected entities that were already stored...
- Standard_EXPORT AIS_StatusOfPick ShiftSelect (const Standard_Integer XPMin, const Standard_Integer YPMin, const Standard_Integer XPMax, const Standard_Integer YPMax, const Handle(V3d_View)& aView, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT AIS_StatusOfPick ShiftSelect (const Standard_Integer theXPMin,
+ const Standard_Integer theYPMin,
+ const Standard_Integer theXPMax,
+ const Standard_Integer theYPMax,
+ const Handle(V3d_View)& theView,
+ const Standard_Boolean theToUpdateViewer);
//! Specify whether selected object must be hilighted when mouse cursor
//! is moved above it (in MoveTo method). By default this value is false and
//! Object activates the selection mode; the object is
//! displayed but no viewer will be updated.
Standard_DEPRECATED ("Local Context is deprecated - local selection should be used without Local Context")
- Standard_EXPORT void SetCurrentObject (const Handle(AIS_InteractiveObject)& aniobj, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void SetCurrentObject (const Handle(AIS_InteractiveObject)& theIObj,
+ const Standard_Boolean theToUpdateViewer);
//! Allows to add or remove the object given to the list of current and highlight/unhighlight it
//! of the object is empty this method simply does nothing.
Standard_DEPRECATED ("Local Context is deprecated - local selection should be used without Local Context")
Standard_EXPORT void AddOrRemoveCurrentObject (const Handle(AIS_InteractiveObject)& theObj,
- const Standard_Boolean theIsToUpdateViewer = Standard_True);
+ const Standard_Boolean theIsToUpdateViewer);
//! Updates the list of current objects, i.e. hilights new
//! current objects, removes hilighting from former current objects.
//! Object activates the selection mode; the object is
//! displayed but no viewer will be updated.
Standard_DEPRECATED ("Local Context is deprecated - local selection should be used without Local Context")
- Standard_EXPORT void HilightCurrents (const Standard_Boolean theToUpdateViewer = Standard_True);
+ Standard_EXPORT void HilightCurrents (const Standard_Boolean theToUpdateViewer);
//! Removes highlighting from current objects.
//! Objects selected when there is no open local context
//! Object activates the selection mode; the object is
//! displayed but no viewer will be updated.
Standard_DEPRECATED ("Local Context is deprecated - local selection should be used without Local Context")
- Standard_EXPORT void UnhilightCurrents (const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void UnhilightCurrents (const Standard_Boolean theToUpdateViewer);
//! Empties previous current objects in order to get the
//! current objects detected by the selector using
//! Object activates the selection mode; the object is
//! displayed but no viewer will be updated.
Standard_DEPRECATED ("Local Context is deprecated - local selection should be used without Local Context")
- Standard_EXPORT void ClearCurrents (const Standard_Boolean theToUpdateViewer = Standard_True);
+ Standard_EXPORT void ClearCurrents (const Standard_Boolean theToUpdateViewer);
//! @return current mouse-detected shape or empty (null) shape, if current interactive object
//! is not a shape (AIS_Shape) or there is no current mouse-detected interactive object at all.
//! Marks owner given as selected and highlights it.
//! Performs selection filters check.
Standard_EXPORT void SetSelected (const Handle(SelectMgr_EntityOwner)& theOwners,
- const Standard_Boolean theToUpdateViewer = Standard_True);
+ const Standard_Boolean theToUpdateViewer);
//! Puts the interactive object aniObj in the list of
//! selected objects.
//! displayed but no viewer will be updated.
//! Performs selection filters check.
Standard_EXPORT void SetSelected (const Handle(AIS_InteractiveObject)& theObject,
- const Standard_Boolean theToUpdateViewer = Standard_True);
+ const Standard_Boolean theToUpdateViewer);
//! Updates the list of selected objects:
//! i.e. highlights the newely selected ones and unhighlights previously selected objects.
- Standard_EXPORT void UpdateSelected (const Standard_Boolean theToUpdateViewer = Standard_True);
+ Standard_EXPORT void UpdateSelected (const Standard_Boolean theToUpdateViewer);
//! Allows to highlight or unhighlight the owner given depending on its selection status
Standard_EXPORT void AddOrRemoveSelected (const Handle(AIS_InteractiveObject)& theObject,
- const Standard_Boolean theToUpdateViewer = Standard_True);
+ const Standard_Boolean theToUpdateViewer);
//! Highlights selected objects.
//! If a local context is open and if updateviewer equals
//! Standard_False, the presentation of the Interactive
//! Object activates the selection mode; the object is
//! displayed but no viewer will be updated.
- Standard_EXPORT void HilightSelected (const Standard_Boolean theToUpdateViewer = Standard_True);
+ Standard_EXPORT void HilightSelected (const Standard_Boolean theToUpdateViewer);
//! Removes highlighting from selected objects.
//! If a local context is open and if updateviewer equals
//! Standard_False, the presentation of the Interactive
//! Object activates the selection mode; the object is
//! displayed but no viewer will be updated.
- Standard_EXPORT void UnhilightSelected (const Standard_Boolean theToUpdateViewer = Standard_True);
+ Standard_EXPORT void UnhilightSelected (const Standard_Boolean theToUpdateViewer);
//! Empties previous selected objects in order to get the
//! selected objects detected by the selector using
//! Standard_False, the presentation of the Interactive
//! Object activates the selection mode; the object is
//! displayed but no viewer will be updated.
- Standard_EXPORT void ClearSelected (const Standard_Boolean theToUpdateViewer = Standard_True);
+ Standard_EXPORT void ClearSelected (const Standard_Boolean theToUpdateViewer);
//! No right to Add a selected Shape (Internal Management
//! of shape Selection).
//! A Previous selected shape may only be removed.
Standard_DEPRECATED ("Local Context is deprecated - local selection should be used without Local Context")
- Standard_EXPORT void AddOrRemoveSelected (const TopoDS_Shape& aShape, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void AddOrRemoveSelected (const TopoDS_Shape& theShape,
+ const Standard_Boolean theToUpdateViewer);
//! Allows to highlight or unhighlight the owner given depending on its selection status
Standard_EXPORT void AddOrRemoveSelected (const Handle(SelectMgr_EntityOwner)& theOwner,
- const Standard_Boolean theToUpdateViewer = Standard_True);
+ const Standard_Boolean theToUpdateViewer);
//! Returns true is the owner given is selected
Standard_EXPORT Standard_Boolean IsSelected (const Handle(SelectMgr_EntityOwner)& theOwner) const;
//! Interactive Functions can open local contexts
//! without necessarily warning the user.
Standard_DEPRECATED ("Local Context is deprecated - local selection should be used without Local Context")
- Standard_EXPORT void CloseLocalContext (const Standard_Integer Index = -1, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void CloseLocalContext (const Standard_Integer theIndex = -1,
+ const Standard_Boolean theToUpdateViewer = Standard_True);
//! returns -1 if no opened local context.
Standard_DEPRECATED ("Local Context is deprecated - local selection should be used without Local Context")
//! Object activates the selection mode; the object is
//! displayed but no viewer will be updated.
Standard_DEPRECATED ("Local Context is deprecated - local selection should be used without Local Context")
- Standard_EXPORT void CloseAllContexts (const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void CloseAllContexts (const Standard_Boolean theToUpdateViewer);
//! to be used only with no opened
//! local context.. displays and activates objects in their
//! original state before local contexts were opened...
- Standard_EXPORT void ResetOriginalState (const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void ResetOriginalState (const Standard_Boolean theToUpdateViewer);
//! clears Objects/Filters/Activated Modes list in the current opened local context.
Standard_DEPRECATED ("Local Context is deprecated - local selection should be used without Local Context")
//! Object activates the selection mode; the object is
//! displayed but no viewer will be updated.
Standard_DEPRECATED ("Local Context is deprecated - local selection should be used without Local Context")
- Standard_EXPORT void SetTemporaryAttributes (const Handle(AIS_InteractiveObject)& anObj, const Handle(Prs3d_Drawer)& aDrawer, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void SetTemporaryAttributes (const Handle(AIS_InteractiveObject)& theIObj,
+ const Handle(Prs3d_Drawer)& theDrawer,
+ const Standard_Boolean theToUpdateViewer);
//! Highlights, and removes highlights from, the displayed
//! Standard_False, the presentation of the Interactive
//! Object activates the selection mode; the object is
//! displayed but no viewer will be updated.
- Standard_EXPORT void SubIntensityOn (const Handle(AIS_InteractiveObject)& aniobj, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void SubIntensityOn (const Handle(AIS_InteractiveObject)& theIObj,
+ const Standard_Boolean theToUpdateViewer);
//! Removes the subintensity option for the entity aniobj.
//! Standard_False, the presentation of the Interactive
//! Object activates the selection mode; the object is
//! displayed but no viewer will be updated.
- Standard_EXPORT void SubIntensityOff (const Handle(AIS_InteractiveObject)& aniobj, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void SubIntensityOff (const Handle(AIS_InteractiveObject)& theIObj,
+ const Standard_Boolean theToUpdateViewer);
//! hilights/unhilights displayed objects which are displayed at
//! neutral state with subintensity color;
//! available only for active local context.
//! No effect if no local context.
- Standard_EXPORT void SubIntensityOn (const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void SubIntensityOn (const Standard_Boolean theToUpdateViewer);
//! removes subintensity option for all objects.
- Standard_EXPORT void SubIntensityOff (const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void SubIntensityOff (const Standard_Boolean theToUpdateViewer);
//! Allows you to add the filter aFilter to Neutral Point or
//! to a local context if one or more selection modes have been activated.
//! Fits the view correspondingly to the bounds of selected objects.
//! Infinite objects are ignored if infinite state of AIS_InteractiveObject
//! is set to true.
- Standard_EXPORT void FitSelected (const Handle(V3d_View)& theView, const Standard_Real theMargin = 0.01, const Standard_Boolean theToUpdate = Standard_True);
+ Standard_EXPORT void FitSelected (const Handle(V3d_View)& theView,
+ const Standard_Real theMargin,
+ const Standard_Boolean theToUpdate);
+
+ //! Fits the view correspondingly to the bounds of selected objects.
+ //! Infinite objects are ignored if infinite state of AIS_InteractiveObject is set to true.
+ Standard_EXPORT void FitSelected (const Handle(V3d_View)& theView);
Standard_EXPORT void DisplayActiveSensitive (const Handle(AIS_InteractiveObject)& anObject, const Handle(V3d_View)& aView);
Standard_EXPORT void GetDefModes (const Handle(AIS_InteractiveObject)& anIobj, Standard_Integer& Dmode, Standard_Integer& HiMod, Standard_Integer& SelMode) const;
- Standard_EXPORT void EraseGlobal (const Handle(AIS_InteractiveObject)& anObj, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void EraseGlobal (const Handle(AIS_InteractiveObject)& theIObj,
+ const Standard_Boolean theToUpdateViewer);
- Standard_EXPORT void ClearGlobal (const Handle(AIS_InteractiveObject)& anObj, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void ClearGlobal (const Handle(AIS_InteractiveObject)& theIObj,
+ const Standard_Boolean theToUpdateViewer);
- Standard_EXPORT void ClearGlobalPrs (const Handle(AIS_InteractiveObject)& anObj, const Standard_Integer aMode, const Standard_Boolean updateviewer = Standard_True);
+ Standard_EXPORT void ClearGlobalPrs (const Handle(AIS_InteractiveObject)& theObj,
+ const Standard_Integer theMode,
+ const Standard_Boolean theToUpdateViewer);
Standard_EXPORT void InitAttributes();
Standard_EXPORT Standard_Integer PurgeViewer (const Handle(V3d_Viewer)& Vwr);
//! UNKNOWN
- Standard_EXPORT void redisplayPrsModes (const Handle(AIS_InteractiveObject)& theIObj, const Standard_Boolean theToUpdateViewer = Standard_True);
+ Standard_EXPORT void redisplayPrsModes (const Handle(AIS_InteractiveObject)& theIObj,
+ const Standard_Boolean theToUpdateViewer);
//! UNKNOWN
- Standard_EXPORT void redisplayPrsRecModes (const Handle(AIS_InteractiveObject)& theIObj, const Standard_Boolean theToUpdateViewer = Standard_True);
+ Standard_EXPORT void redisplayPrsRecModes (const Handle(AIS_InteractiveObject)& theIObj,
+ const Standard_Boolean theToUpdateViewer);
//! Helper function to unhighlight all entity owners currently highlighted with seleciton color.
Standard_EXPORT void unhighlightOwners (const Handle(AIS_InteractiveObject)& theObject);
//=======================================================================
void AIS_InteractiveContext::UpdateCurrent()
{
- UpdateSelected();
+ UpdateSelected (Standard_True);
}
//=======================================================================
// If subintensity used
else if (Att->IsSubIntensityOn())
{
- myCTX->SubIntensityOff (aSelectable);
+ myCTX->SubIntensityOff (aSelectable, Standard_False);
}
// Deactivate stored selection modes
else {
if (CurAtt->IsSubIntensityOn())
{
- myCTX->SubIntensityOff(SO);
+ myCTX->SubIntensityOff(SO, Standard_False);
}
Standard_Integer DiMo = SO->HasDisplayMode()?
SO->DisplayMode():myCTX->DisplayMode();
}
aContext->Load (this);
- aContext->CurrentViewer()->RedrawImmediate();
}
if (theOptions.EnableModes)
if (hasContext)
{
if (anAISContext->IsSelected (myShapes[anIdx]))
- anAISContext->AddOrRemoveSelected (myShapes[anIdx]);
+ anAISContext->AddOrRemoveSelected (myShapes[anIdx], Standard_False);
anAISContext->Remove (myShapes[anIdx], Standard_False);
}
theAISPlaneTri->SetLength(Length);
GetMapOfAIS().Bind ( theAISPlaneTri, name);
- aContext->Display(theAISPlaneTri );
+ aContext->Display (theAISPlaneTri, Standard_True);
}
Standard_Real getLength = theAISPlaneTri->GetLength();
Graphic3d_MaterialAspect mat(Graphic3d_NOM_PLASTIC);
AS->SetMaterial(mat);
AS->SetColor(Quantity_NOC_RED);
- myAISContext->Display(AS);
+ myAISContext->Display (AS, Standard_False);
gp_Trsf TouchTrsf;
TouchTrsf.SetTranslation(gp_Vec(20, 20, 0));
return 1;
}
- anAISCtx->EraseAll();
+ anAISCtx->EraseAll (Standard_False);
//load primitives to context
Handle(AIS_InteractiveObject) aSh1 = new AIS_Shape(aBox);
- anAISCtx->Display(aSh1);
+ anAISCtx->Display (aSh1, Standard_False);
Handle(AIS_InteractiveObject) aSh2 = new AIS_Shape(aSphere);
- anAISCtx->Display(aSh2);
+ anAISCtx->Display (aSh2, Standard_False);
Handle(AIS_InteractiveObject) aSh3 = new AIS_Shape(aCone);
- anAISCtx->Display(aSh3);
+ anAISCtx->Display (aSh3, Standard_False);
Handle(AIS_InteractiveObject) aSh4 = new AIS_Shape(aCyl);
- anAISCtx->Display(aSh4);
+ anAISCtx->Display (aSh4, Standard_False);
//set selected
anAISCtx->InitSelected();
- anAISCtx->AddOrRemoveSelected(aSh1);
- anAISCtx->AddOrRemoveSelected(aSh2);
- anAISCtx->AddOrRemoveSelected(aSh3);
- anAISCtx->AddOrRemoveSelected(aSh4);
+ anAISCtx->AddOrRemoveSelected (aSh1, Standard_False);
+ anAISCtx->AddOrRemoveSelected (aSh2, Standard_False);
+ anAISCtx->AddOrRemoveSelected (aSh3, Standard_False);
+ anAISCtx->AddOrRemoveSelected (aSh4, Standard_False);
//remove all this objects from context
anAISCtx->Remove (aSh1, Standard_False);
anAISCtx->Remove (aSh2, Standard_False);
anAISCtx->Remove (aSh3, Standard_False);
anAISCtx->Remove (aSh4, Standard_False);
+
+ anAISCtx->UpdateCurrentViewer();
return 0;
}
myAISContext->EraseAll(Standard_False);
Handle(Geom_CartesianPoint) GEOMPoint = new Geom_CartesianPoint(g_pnt);
Handle(AIS_Point) AISPoint = new AIS_Point(GEOMPoint);
- myAISContext->Display(AISPoint);
+ myAISContext->Display (AISPoint, Standard_True);
BRepPrimAPI_MakeHalfSpace half_(sh_, g_pnt);
TopoDS_Solid sol1_ = half_.Solid();
aCS->SetSize (aWinWidth, aWinHeight);
if ( !V.IsNull() ) {
if (mode == 0) {
- aContext->Display (aCS);
+ aContext->Display (aCS, Standard_True);
}
if (mode == 1) {
- aContext->Erase (aCS);
+ aContext->Erase (aCS, Standard_False);
V->UpdateLights();
V->Update();
}
myV3dView->Convert(Xv,Yv,Xp,Yp);
// cout<<Xp<<"\t"<<Yp<<endl;
- myAISContext->MoveTo( Xp,Yp, myV3dView );
- myAISContext->MoveTo( Xp,Yp, myV3dView );
+ myAISContext->MoveTo (Xp,Yp, myV3dView, Standard_True);
// if (myAISContext->IsHilighted(anAISShape))
// cout << "has hilighted shape : OK" << endl;
{
theObject1 = new QABugs_PresentableObject();
theObject1->SetDisplayMode(0);
- myAISContext->Display(theObject1);
+ myAISContext->Display (theObject1, Standard_True);
}
} else if(Draw::Atoi(argv[1]) == 1) {
if ( theObject2.IsNull() )
{
theObject2 = new QABugs_PresentableObject();
theObject2->SetDisplayMode(1);
- myAISContext->Display(theObject2);
+ myAISContext->Display (theObject2, Standard_True);
}
} else {
di << "Usage : " << argv[0] << " 0/1\n";
Handle(AIS_InteractiveObject) aTrihedron;
Handle(Geom_Axis2Placement) aTrihedronAxis=new Geom_Axis2Placement(gp::XOY());
aTrihedron=new AIS_Trihedron(aTrihedronAxis);
- myAISContext->Display(aTrihedron);
+ myAISContext->Display (aTrihedron, Standard_False);
//Circle
gp_Pnt P(10,10,10);
Handle(Geom_Circle) ahCircle=new Geom_Circle(aAx2,20);
Handle(AIS_InteractiveObject) aCircle=new AIS_Circle(ahCircle);
- myAISContext->Display(aCircle);
+ myAISContext->Display (aCircle, Standard_False);
const Handle(Prs3d_Drawer)& aSelStyle = myAISContext->SelectionStyle();
aSelStyle->SetColor (Quantity_NOC_BLUE1);
- myAISContext->AddOrRemoveSelected(aTrihedron);
- myAISContext->AddOrRemoveSelected(aCircle);
+ myAISContext->AddOrRemoveSelected (aTrihedron, Standard_False);
+ myAISContext->AddOrRemoveSelected (aCircle, Standard_True);
return 0;
}
Standard_Integer aXPixMax = aWinWidth;
Standard_Integer aYPixMax = aWinHeight;
- AIS_StatusOfPick aPickStatus = anAISContext->Select (aXPixMin, aYPixMin, aXPixMax, aYPixMax, aV3dView);
+ AIS_StatusOfPick aPickStatus = anAISContext->Select (aXPixMin, aYPixMin, aXPixMax, aYPixMax, aV3dView, Standard_False);
theDi << (aPickStatus == AIS_SOP_NothingSelected
? "status = AIS_SOP_NothingSelected : OK"
: "status = AIS_SOP_NothingSelected : bugged - Faulty ");
theDi.Eval ("box b 10 10 10");
theDi.Eval (" vdisplay b");
- aPickStatus = anAISContext->Select (aXPixMin, aYPixMin, aXPixMax, aYPixMax, aV3dView);
+ aPickStatus = anAISContext->Select (aXPixMin, aYPixMin, aXPixMax, aYPixMax, aV3dView, Standard_False);
theDi << (aPickStatus == AIS_SOP_OneSelected
? "status = AIS_SOP_OneSelected : OK"
: "status = AIS_SOP_OneSelected : bugged - Faulty ");
theDi.Eval ("box w 20 20 20 20 20 20");
theDi.Eval (" vdisplay w");
- aPickStatus = anAISContext->Select (aXPixMin, aYPixMin, aXPixMax, aYPixMax, aV3dView);
+ aPickStatus = anAISContext->Select (aXPixMin, aYPixMin, aXPixMax, aYPixMax, aV3dView, Standard_True);
theDi << (aPickStatus == AIS_SOP_SeveralSelected
? "status = AIS_SOP_SeveralSelected : OK"
: "status = AIS_SOP_SeveralSelected : bugged - Faulty ");
di << argv[5] << " " << Draw::Atof(argv[4]) << "\n";
Handle(AIS_AngleDimension) aDim = new AIS_AngleDimension(aFirst, aSecond);
- aContext->Display(aDim);
+ aContext->Display (aDim, Standard_True);
return 0;
}
theAISPlaneTri->SetYLabel(Ylabel);
GetMapOfAIS().Bind ( theAISPlaneTri, name);
- aContext->Display(theAISPlaneTri );
+ aContext->Display (theAISPlaneTri, Standard_True);
}
return 0;
}
TopoDS_Edge E1 = BRepBuilderAPI_MakeEdge(p1, p2);
TopoDS_Edge E2 = BRepBuilderAPI_MakeEdge(p2, p3);
- context->Display(new AIS_Shape(E1));
- context->Display(new AIS_Shape(E2));
+ context->Display (new AIS_Shape(E1), Standard_False);
+ context->Display (new AIS_Shape(E2), Standard_True);
gp_Pnt plnpt(0, 0, 0);
gp_Dir plndir(0, 0, 1);
Handle(V3d_View) V3dView = ViewerTest::CurrentView();
- aContext->Select(Polyline,V3dView);
+ aContext->Select (Polyline, V3dView, Standard_False);
aContext->UpdateCurrentViewer();
return 0;
if(!aContext.IsNull()) {
Handle(AIS_Shape) aisp =
new AIS_Shape (BRepBuilderAPI_MakeEdge(GeomAPI::To3d(curve2d, pln)).Edge());
- aContext->Display (aisp);
+ aContext->Display (aisp, Standard_False);
}
Handle(Geom2d_Curve) fromcurve2d = GeomAPI::To2d (cir, pln);
if(!aContext.IsNull()) {
Handle(AIS_Shape) aisp =
new AIS_Shape (BRepBuilderAPI_MakeEdge(GeomAPI::To3d(fromcurve2d, pln)).Edge());
- aContext->Display (aisp);
+ aContext->Display (aisp, Standard_False);
}
Geom2dAdaptor_Curve acur (curve2d), afromcur (fromcurve2d);
DrawTrSurf::Set(st,glin);
if(!aContext.IsNull()) {
Handle(AIS_Shape) aisp =
- new AIS_Shape (BRepBuilderAPI_MakeEdge(GeomAPI::To3d(glin, pln)).Edge()); aContext->Display (aisp);
+ new AIS_Shape (BRepBuilderAPI_MakeEdge(GeomAPI::To3d(glin, pln)).Edge());
+ aContext->Display (aisp, Standard_False);
}
}
+ aContext->UpdateCurrentViewer();
di << " Is Done = \n" << (Standard_Integer) lintan.IsDone();
return 0;
}
di << "total no of wires are ............. " << i << "\n";
TopoDS_Wire spineWire = bRepSpineWire.Wire();
- aContext->Display(new AIS_Shape(spineWire));
+ aContext->Display (new AIS_Shape(spineWire), Standard_False);
DBRep::Set("slineW",spineWire);
gp_Circ gpCirc(gpAx2, 2.5);
BRepBuilderAPI_MakeWire aMWire(BRepBuilderAPI_MakeEdge(new Geom_Circle(gpCirc)).Edge());
TopoDS_Wire topoWire(aMWire);
- aContext->Display(new AIS_Shape(topoWire));
+ aContext->Display (new AIS_Shape(topoWire), Standard_False);
DBRep::Set("topoW",topoWire);
bRepPipe.Add(topoWire);
bRepPipe.Build();
- aContext->Display(new AIS_Shape(bRepPipe.Shape()));
+ aContext->Display (new AIS_Shape(bRepPipe.Shape()), Standard_True);
DBRep::Set(argv[2],bRepPipe.Shape());
Handle(AIS_Trihedron) aTrihedron;
Handle(Geom_Axis2Placement) aTrihedronAxis=new Geom_Axis2Placement(gp::XOY());
aTrihedron=new AIS_Trihedron(aTrihedronAxis);
- myAISContext->Display(aTrihedron);
+ myAISContext->Display (aTrihedron, Standard_True);
Standard_DISABLE_DEPRECATION_WARNINGS
myAISContext->OpenLocalContext();
Standard_Integer Xp,Yp;
myV3dView->Convert(Xv,Yv,Xp,Yp);
- myAISContext->MoveTo( Xp,Yp, myV3dView );
- myAISContext->MoveTo( Xp,Yp, myV3dView );
+ myAISContext->MoveTo (Xp,Yp, myV3dView, Standard_False);
+ myAISContext->MoveTo (Xp,Yp, myV3dView, Standard_True);
if (myAISContext->HasDetected( ))
di << "has detected shape : OK" << "\n";
Handle(AIS_LengthDimension) len = new AIS_LengthDimension(V2, V3, pln->Pln());
anAspect->ArrowAspect()->SetLength (30.0);
len->SetDimensionAspect (anAspect);
- context->Display(len);
+ context->Display (len, Standard_False);
/***************************************/
//dimension "L 90"
/***************************************/
len1->SetDimensionAspect (anAspect);
len1->SetFlyout (30.0);
anAspect->ArrowAspect()->SetLength (100.0);
- context->Display(len1);
+ context->Display (len1, Standard_False);
/***************************************/
//dimension "L 150"
/***************************************/
Handle(AIS_LengthDimension) len2 = new AIS_LengthDimension(V1, V2, pln->Pln());
len2->SetDimensionAspect (anAspect);
- context->Display(len2);
+ context->Display (len2, Standard_False);
/***************************************/
//dimension "R 88.58"
/***************************************/
TopoDS_Edge E1 = BRepBuilderAPI_MakeEdge(cir,gp_Pnt(191.09,0,0.),gp_Pnt(191.09,-177.16,0.) );
Handle(AIS_RadiusDimension) dim1 = new AIS_RadiusDimension(E1);
dim1->SetDimensionAspect (anAspect);
- context->Display(dim1);
+ context->Display (dim1, Standard_False);
/***************************************/
//dimension "R 43.80"
/***************************************/
dim1 = new AIS_RadiusDimension(E_cir1);
anAspect->ArrowAspect()->SetLength (60.0);
dim1->SetDimensionAspect (anAspect);
- context->Display(dim1);
+ context->Display (dim1, Standard_False);
/***************************************/
//dimension "R 17.86"
/***************************************/
dim1 = new AIS_RadiusDimension(E_cir2);
anAspect->ArrowAspect()->SetLength (40.0);
dim1->SetDimensionAspect (anAspect);
- context->Display(dim1);
+ context->Display (dim1, Standard_True);
return 0;
}
Handle(AIS_InteractiveObject) ais2 = new AIS_Shape(box2.Shape());
Handle(AIS_InteractiveObject) ais3 = new AIS_Shape(box3.Shape());
- aContext->Display(ais1);
- aContext->Display(ais2);
- aContext->Display(ais3);
+ aContext->Display (ais1, Standard_False);
+ aContext->Display (ais2, Standard_False);
+ aContext->Display (ais3, Standard_False);
- aContext->AddOrRemoveSelected(ais1);
- aContext->AddOrRemoveSelected(ais2);
- aContext->AddOrRemoveSelected(ais3);
+ aContext->AddOrRemoveSelected (ais1, Standard_False);
+ aContext->AddOrRemoveSelected (ais2, Standard_False);
+ aContext->AddOrRemoveSelected (ais3, Standard_False);
di << "\n No of currents = " << aContext->NbSelected();
{
di << "\n count is = " << count++;
Handle(AIS_InteractiveObject) ais = aContext->SelectedInteractive();
- aContext->AddOrRemoveSelected(ais);
+ aContext->AddOrRemoveSelected (ais, Standard_False);
aContext->InitSelected();
}
+ aContext->UpdateCurrentViewer();
+
return 0;
}
builder.Add(comp, cs2);
Handle(AIS_Shape) ais = new AIS_Shape(comp);
- aContext->Display(ais);
+ aContext->Display (ais, Standard_False);
TopExp_Explorer exp(comp, TopAbs_COMPSOLID);
while(exp.More())
Handle (StdSelect_ShapeTypeFilter) filt = new StdSelect_ShapeTypeFilter(TopAbs_COMPSOLID);
aContext->AddFilter(filt);
Standard_DISABLE_DEPRECATION_WARNINGS
- aContext->CloseAllContexts();
+ aContext->CloseAllContexts (Standard_False);
aContext->OpenLocalContext();
aContext->ActivateStandardMode(TopAbs_SOLID);
Standard_ENABLE_DEPRECATION_WARNINGS
+
+ aContext->UpdateCurrentViewer();
+
return 0;
}
Handle(AIS_InteractiveObject) ais2 = new AIS_Shape(box2.Shape());
Handle(AIS_InteractiveObject) ais3 = new AIS_Shape(box3.Shape());
- aContext->Display(ais1);
- aContext->Display(ais2);
- aContext->Display(ais3);
+ aContext->Display (ais1, Standard_False);
+ aContext->Display (ais2, Standard_False);
+ aContext->Display (ais3, Standard_False);
- aContext->AddOrRemoveSelected(ais1);
- aContext->AddOrRemoveSelected(ais2);
- aContext->AddOrRemoveSelected(ais3);
+ aContext->AddOrRemoveSelected (ais1, Standard_False);
+ aContext->AddOrRemoveSelected (ais2, Standard_False);
+ aContext->AddOrRemoveSelected (ais3, Standard_False);
di << "\n No of selected = " << aContext->NbSelected();
{
di << "\n count is = %d" << count++;
Handle(AIS_InteractiveObject) ais = aContext->SelectedInteractive();
- aContext->AddOrRemoveSelected(ais);
+ aContext->AddOrRemoveSelected (ais, Standard_False);
aContext->InitSelected();
}
+ aContext->UpdateCurrentViewer();
+
return 0;
}
if(!aContext.IsNull()) {
Handle(AIS_Shape) aisp =
new AIS_Shape (BRepBuilderAPI_MakeEdge(GeomAPI::To3d(curve2d, pln)).Edge());
- aContext->Display (aisp);
+ aContext->Display (aisp, Standard_False);
}
//This does not give any solutions.
DrawTrSurf::Set(st,glin);
if(!aContext.IsNull()) {
Handle(AIS_Shape) aisp =
- new AIS_Shape (BRepBuilderAPI_MakeEdge(GeomAPI::To3d(glin, pln)).Edge()); aContext->Display (aisp);
+ new AIS_Shape (BRepBuilderAPI_MakeEdge(GeomAPI::To3d(glin, pln)).Edge());
+ aContext->Display (aisp, Standard_False);
}
}
+ if (!aContext.IsNull())
+ {
+ aContext->UpdateCurrentViewer();
+ }
+
return 0;
}
if(!aContext.IsNull()) {
Handle(AIS_Shape) aisp =
new AIS_Shape (BRepBuilderAPI_MakeEdge(GeomAPI::To3d(curve2d, pln)).Edge());
- aContext->Display (aisp);
+ aContext->Display (aisp, Standard_False);
}
if(!aContext.IsNull()) {
Handle(AIS_Shape) aisp =
new AIS_Shape (BRepBuilderAPI_MakeEdge(GeomAPI::To3d(fromcurve2d, pln)).Edge());
- aContext->Display (aisp);
+ aContext->Display (aisp, Standard_False);
}
Geom2dAdaptor_Curve acur(curve2d), afromcur(fromcurve2d);
DrawTrSurf::Set(st,glin);
if(!aContext.IsNull()) {
Handle(AIS_Shape) aisp =
- new AIS_Shape (BRepBuilderAPI_MakeEdge(GeomAPI::To3d(glin, pln)).Edge()); aContext->Display (aisp);
+ new AIS_Shape (BRepBuilderAPI_MakeEdge(GeomAPI::To3d(glin, pln)).Edge());
+ aContext->Display (aisp, Standard_False);
}
}
+ if (!aContext.IsNull())
+ {
+ aContext->UpdateCurrentViewer();
+ }
+
return 0;
}
aDrawer->SetShadingAspect (aShadingAspect);
- anAISContext->Display(anAisIO, 1, 0);
+ anAISContext->Display (anAisIO, 1, 0, Standard_True);
Standard_Real r, g, b;
aShadingAspect->Color(Aspect_TOFM_FRONT_SIDE).Values(r,g,b, Quantity_TOC_RGB);
TopoDS_Shape sh = DBRep::Get(argv[1]);
Handle(AIS_Shape) ais = new AIS_Shape(sh);
- AISContext->Display(ais,1,0);
- AISContext->SetMaterial(ais,Graphic3d_NOM_SHINY_PLASTIC);
+ AISContext->Display (ais, 1, 0, Standard_False);
+ AISContext->SetMaterial (ais, Graphic3d_NOM_SHINY_PLASTIC, Standard_False);
Quantity_Color colf(0.0, 0.4, 0.0, Quantity_TOC_RGB);
Quantity_Color colb(0.0, 0.0, 0.6, Quantity_TOC_RGB);
back.SetTransparency(0.2);
sa->SetMaterial(back,Aspect_TOFM_BACK_SIDE);
- AISContext->Redisplay(ais,1,0);
+ AISContext->Redisplay (ais, 1, 0);
return 0;
}
}
TopoDS_Edge sh = BRepBuilderAPI_MakeEdge(bez).Edge();
Handle(AIS_Shape) ais = new AIS_Shape(sh);
- aContext->Display(ais);
+ aContext->Display (ais, Standard_True);
DrawTrSurf::Set(argv[2],bez);
return 0;
}
{
TopoDS_Shape rshape = anormpro.Projection();
Handle(AIS_InteractiveObject) myShape = new AIS_Shape (rshape);
- myAISContext->SetColor(myShape, Quantity_Color(Quantity_NOC_YELLOW));
- myAISContext->Display(myShape, Standard_True);
+ myAISContext->SetColor (myShape, Quantity_Color(Quantity_NOC_YELLOW), Standard_False);
+ myAISContext->Display (myShape, Standard_True);
}
return 0;
Handle(AIS_TexturedShape) aTexturedShape = new AIS_TexturedShape (aBlankShape);
aTexturedShape->SetTexturePixMap (anImage);
- anAISContext->Display (aTexturedShape, 3, 0);
+ anAISContext->Display (aTexturedShape, 3, 0, Standard_True);
return 0;
}
BRepBuilderAPI_MakeEdge anEdgeBuilder (aStart, anEnd);
TopoDS_Edge anEdge = anEdgeBuilder.Edge();
Handle(AIS_Shape) aTestAISShape = new AIS_Shape (anEdge);
- anAISContext->Display (aTestAISShape);
+ anAISContext->Display (aTestAISShape, Standard_True);
// 2. activate it in selection modes
TColStd_SequenceOfInteger aModes;
BRepPrimAPI_MakeSphere aSphereBuilder (gp_Pnt (0.0, 0.0, 0.0), 1.0);
Handle(AIS_Shape) aSphere = new AIS_Shape (aSphereBuilder.Shape());
- anAISContext->Display (aSphere);
+ anAISContext->Display (aSphere, Standard_False);
for (Standard_Integer aChildIdx = 0; aChildIdx < 5; ++aChildIdx)
{
BRepPrimAPI_MakeSphere aBuilder (gp_Pnt (1.0 + aChildIdx, 1.0 + aChildIdx, 1.0 + aChildIdx), 1.0);
Handle(AIS_Shape) aChild = new AIS_Shape (aBuilder.Shape());
aSphere->AddChild (aChild);
- anAISContext->Display (aChild);
+ anAISContext->Display (aChild, Standard_False);
}
anAISContext->RecomputeSelectionOnly (aSphere);
+ anAISContext->UpdateCurrentViewer();
return 0;
}
Handle(AIS_InteractiveObject) aBox2 = new AIS_Shape (aBuilder2.Shape());
const Handle(AIS_InteractiveContext) aCtx = ViewerTest::GetAISContext();
- aCtx->Display (aBox1, 0, 2);
- aCtx->Display (aBox2, 0, 2);
+ aCtx->Display (aBox1, 0, 2, Standard_False);
+ aCtx->Display (aBox2, 0, 2, Standard_False);
ViewerTest::CurrentView()->FitAll();
- aCtx->SetWidth (aBox1, 3);
- aCtx->SetWidth (aBox2, 3);
+ aCtx->SetWidth (aBox1, 3, Standard_False);
+ aCtx->SetWidth (aBox2, 3, Standard_False);
- aCtx->MoveTo (305, 322, ViewerTest::CurrentView());
- aCtx->ShiftSelect();
- aCtx->MoveTo (103, 322, ViewerTest::CurrentView());
- aCtx->ShiftSelect();
+ aCtx->MoveTo (305, 322, ViewerTest::CurrentView(), Standard_False);
+ aCtx->ShiftSelect (Standard_False);
+ aCtx->MoveTo (103, 322, ViewerTest::CurrentView(), Standard_False);
+ aCtx->ShiftSelect (Standard_False);
if (aCtx->NbSelected() != 0)
{
theDI << "ERROR: no boxes must be selected!\n";
aCtx->SetSelectionSensitivity (aBox1, 2, 5);
- aCtx->MoveTo (305, 322, ViewerTest::CurrentView());
- aCtx->ShiftSelect();
+ aCtx->MoveTo (305, 322, ViewerTest::CurrentView(), Standard_False);
+ aCtx->ShiftSelect (Standard_False);
if (aCtx->NbSelected() != 1)
{
theDI << "ERROR: b1 was not selected\n";
return 1;
}
- aCtx->MoveTo (103, 322, ViewerTest::CurrentView());
- aCtx->ShiftSelect();
+ aCtx->MoveTo (103, 322, ViewerTest::CurrentView(), Standard_False);
+ aCtx->ShiftSelect (Standard_True);
if (aCtx->NbSelected() != 1)
{
theDI << "ERROR: b2 is selected after b1's tolerance increased\n";
Standard_Integer Xp,Yp;
myV3dView->Convert(Xv,Yv,Xp,Yp);
- aContext->MoveTo(Xp,Yp, myV3dView);
- aContext->Select();
+ aContext->MoveTo (Xp, Yp, myV3dView, Standard_False);
+ aContext->Select (Standard_False);
bool aHasSelected = false;
for (aContext->InitSelected(); aContext->MoreSelected() && !aHasSelected; aContext->NextSelected()) {
Handle(AIS_InteractiveObject) anIO = aContext->SelectedInteractive();
Standard_ENABLE_DEPRECATION_WARNINGS
// check that there are no selected vertices
- aContext->Select();
+ aContext->Select (Standard_True);
aHasSelected = false;
for (aContext->InitSelected(); aContext->MoreSelected() && !aHasSelected; aContext->NextSelected()) {
Handle(AIS_InteractiveObject) anIO = aContext->SelectedInteractive();
BRepBuilderAPI_MakeEdge anEdgeBuilder (aStart, anEnd);
TopoDS_Edge anEdge = anEdgeBuilder.Edge();
Handle(AIS_InteractiveObject) aTestAISShape = new AIS_Shape (anEdge);
- anAISContext->Display (aTestAISShape);
+ anAISContext->Display (aTestAISShape, Standard_False);
// activate it in selection modes
TColStd_SequenceOfInteger aModes;
Handle(AIS_Shape)::DownCast (aTestAISShape)->Set (aVertexShape);
aTestAISShape->Redisplay();
- anAISContext->AddOrRemoveSelected (aTestAISShape);
+ anAISContext->AddOrRemoveSelected (aTestAISShape, Standard_True);
bool aValidShapeType = false;
for (anAISContext->InitSelected(); anAISContext->MoreSelected(); anAISContext->NextSelected())
return 1;
}
Handle(OCC27700_Text) aPresentation = new OCC27700_Text();
- aContext->Display (aPresentation);
+ aContext->Display (aPresentation, Standard_True);
return 0;
}
di << "use 'vinit' command before " << a[0] << "\n";
return -1;
}
- myAIScontext->EraseAll();
+ myAIScontext->EraseAll (Standard_False);
TopoDS_Vertex V1 = BRepBuilderAPI_MakeVertex(gp_Pnt(0,0,0));
TopoDS_Vertex V2 = BRepBuilderAPI_MakeVertex(gp_Pnt(10,10,0));
Handle(AIS_Shape) Ve1 = new AIS_Shape(V1);
Handle(AIS_Shape) Ve2 = new AIS_Shape(V2);
- myAIScontext->Display(Ve1);
- myAIScontext->Display(Ve2);
+ myAIScontext->Display (Ve1, Standard_False);
+ myAIScontext->Display (Ve2, Standard_False);
Handle(Geom_Plane) Plane1 = new Geom_Plane(gp_Pnt(0,0,0),gp_Dir(0,0,1));
TCollection_ExtendedString Ext1("Dim1");
anAspect->ArrowAspect()->SetLength (1.0);
Dim1->SetDimensionAspect (anAspect);
- myAIScontext->SetDisplayMode(Dim1, Draw::Atoi(a[1]));
- myAIScontext->Display(Dim1);
+ myAIScontext->SetDisplayMode (Dim1, Draw::Atoi(a[1]), Standard_False);
+ myAIScontext->Display (Dim1, Standard_True);
return 0;
}
Handle(Geom2d_Curve) gcir1 = GeomAPI::To2d(gcir, pln->Pln());
TopoDS_Shape sh1 = BRepBuilderAPI_MakeEdge(gcir1, pln).Shape();
Handle(AIS_Shape) ais1 = new AIS_Shape(sh1);
- aContext->SetColor(ais1, Quantity_NOC_INDIANRED);
- aContext->Display(ais1);
+ aContext->SetColor (ais1, Quantity_NOC_INDIANRED, Standard_False);
+ aContext->Display (ais1, Standard_False);
DBRep::Set("sh0",sh1);
gp_Pnt2d thepoint;
// local_get_2Dpointfrom3Dpoint(pt3d, pln->Pln(), thepoint);
DBRep::Set(aStr,sh);
Handle(AIS_Shape) ais = new AIS_Shape(sh);
if( i ==1 )
- aContext->SetColor(ais, Quantity_NOC_GREEN);
+ aContext->SetColor (ais, Quantity_NOC_GREEN, Standard_False);
if( i == 2)
- aContext->SetColor(ais, Quantity_NOC_HOTPINK);
- aContext->Display(ais);
+ aContext->SetColor (ais, Quantity_NOC_HOTPINK, Standard_False);
+ aContext->Display (ais, Standard_False);
Standard_Real ParSol1, ParSol2, ParArg1, ParArg2;
gp_Pnt2d PntSol1, PntSol2;
cirtanrad.Tangency1(i, ParSol1, ParArg1, PntSol1);
printf("%f\t%f\t\t%f\t%f\n",ParSol2, ParArg2,PntSol2.X(),PntSol2.Y());
}
}
+ aContext->UpdateCurrentViewer();
return 0;
}
ais1 = new AIS_Shape(F1);
DBRep::Set("F1",F1);
aContext->SetMaterial(ais1,Graphic3d_NOM_ALUMINIUM,Standard_False);
- aContext->Display(ais1);
+ aContext->Display (ais1, Standard_False);
BRep_Builder B;
TopoDS_Shell shell;
B.MakeShell(shell);
FP = BRepBuilderAPI_MakeFace(mkw.Wire());
ais2 = new AIS_Shape( FP );
aContext->SetMaterial(ais2,Graphic3d_NOM_ALUMINIUM,Standard_False);
- aContext->Display( ais2 );
+ aContext->Display (ais2, Standard_False);
DBRep::Set("FP",FP);
BRepBuilderAPI_MakeFace bzf2( offsurf, Precision::Confusion() );
TopoDS_Face F2= bzf2.Face();
Handle(AIS_Shape) ais22 = new AIS_Shape(F2);
- aContext->Display(ais22);
+ aContext->Display (ais22, Standard_False);
DBRep::Set("F2",F2);
//step 3. filleting the patch.
FP1 = fillet.Shape();
ais2 = new AIS_Shape( FP1 );
aContext->SetMaterial(ais2,Graphic3d_NOM_ALUMINIUM,Standard_False);
- aContext->Display( ais2 );
+ aContext->Display (ais2, Standard_False);
DBRep::Set("FP1",FP1);
myWire->Add((BRepBuilderAPI_MakeEdge(projCurve)).Edge());
}
Handle(AIS_Shape) ais33 = new AIS_Shape( myWire->Wire() );
- aContext->Display(ais33);
+ aContext->Display (ais33, Standard_True);
DBRep::Set("Wire",myWire->Wire());
Handle(Geom_RectangularTrimmedSurface) S = GC_MakeTrimmedCone (P1, P2, R1, R2).Value();
TopoDS_Shape myshape = BRepBuilderAPI_MakeFace(S, Precision::Confusion()).Shape();
Handle(AIS_Shape) ais1 = new AIS_Shape(myshape);
- aContext->Display(ais1);
- aContext->SetColor(ais1, Quantity_NOC_BLUE1);
+ aContext->Display (ais1, Standard_False);
+ aContext->SetColor (ais1, Quantity_NOC_BLUE1, Standard_False);
Handle(Geom_RectangularTrimmedSurface) S2 = GC_MakeTrimmedCone (P1, P2,R1, 0).Value();
TopoDS_Shape myshape2 = BRepBuilderAPI_MakeFace(S2, Precision::Confusion()).Shape();
Handle(AIS_Shape) ais2 = new AIS_Shape(myshape2);
- aContext->Display(ais2);
- aContext->SetColor(ais2, Quantity_NOC_RED);
+ aContext->Display (ais2, Standard_False);
+ aContext->SetColor (ais2, Quantity_NOC_RED, Standard_False);
return 0;
}
Handle(AIS_InteractiveObject) anIO = new AIS_Shape(aShape);
// Handle(AIS_InteractiveObject) anIOa = ViewerTest::GetAISShapeFromName(argv[1]);
anIO->SetHilightMode((argc == 3) ? Draw::Atoi(argv[2]) : 1);
- aContext->Display(anIO);
+ aContext->Display (anIO, Standard_True);
return 0;
}
}
Handle(AIS_Shape) res = new AIS_Shape(sh);
- myContext->Display( res );
+ myContext->Display (res, Standard_True);
return 0;
}
theDrawer->SetShadingAspect(theShadingAspect);
theAISShape->SetAttributes(theDrawer);
- aContext->Display(theAISShape);
+ aContext->Display (theAISShape, Standard_True);
return 0;
}
AIS_ListIteratorOfListOfInteractive It;
for (It.Initialize(aListOfIO);It.More();It.Next())
{
- aContext->AddOrRemoveSelected(It.Value());
+ aContext->AddOrRemoveSelected (It.Value(), Standard_False);
}
-
+ aContext->UpdateCurrentViewer();
return 0;
}
Handle(AIS_InteractiveObject) ais2 = new AIS_Shape(box2.Shape());
Handle(AIS_InteractiveObject) ais3 = new AIS_Shape(box3.Shape());
- aContext->Display(ais1);
- aContext->Display(ais2);
- aContext->Display(ais3);
+ aContext->Display (ais1, Standard_False);
+ aContext->Display (ais2, Standard_False);
+ aContext->Display (ais3, Standard_False);
+
+ aContext->AddOrRemoveSelected (ais1, Standard_False);
+ aContext->AddOrRemoveSelected (ais2, Standard_False);
+ aContext->AddOrRemoveSelected (ais3, Standard_False);
- aContext->AddOrRemoveSelected(ais1);
- aContext->AddOrRemoveSelected(ais2);
- aContext->AddOrRemoveSelected(ais3);
+ aContext->UpdateCurrentViewer();
//printf("\n No of currents = %d", aContext->NbCurrents());
TopoDS_Shape myshape = BRepBuilderAPI_MakeFace(S, Precision::Confusion()).Shape();
DBRep::Set("BUC60857_BLUE",myshape);
Handle(AIS_Shape) ais1 = new AIS_Shape(myshape);
- aContext->Display(ais1);
- aContext->SetColor(ais1, Quantity_NOC_BLUE1);
+ aContext->Display (ais1, Standard_False);
+ aContext->SetColor (ais1, Quantity_NOC_BLUE1, Standard_False);
Handle(Geom_RectangularTrimmedSurface) S2 = GC_MakeTrimmedCone (P1, P2, R1, 0).Value();
TopoDS_Shape myshape2 = BRepBuilderAPI_MakeFace(S2, Precision::Confusion()).Shape();
DBRep::Set("BUC60857_RED",myshape2);
Handle(AIS_Shape) ais2 = new AIS_Shape(myshape2);
- aContext->Display(ais2);
- aContext->SetColor(ais2, Quantity_NOC_RED);
+ aContext->Display (ais2, Standard_False);
+ aContext->SetColor (ais2, Quantity_NOC_RED, Standard_False);
Handle(Geom_RectangularTrimmedSurface) S3 = GC_MakeTrimmedCone (P1, P2, R2, R1).Value();
TopoDS_Shape myshape3 = BRepBuilderAPI_MakeFace(S3, Precision::Confusion()).Shape();
DBRep::Set("BUC60857_GREEN",myshape3);
Handle(AIS_Shape) ais3 = new AIS_Shape(myshape3);
- aContext->Display(ais3);
- aContext->SetColor(ais3, Quantity_NOC_GREEN);
+ aContext->Display (ais3, Standard_False);
+ aContext->SetColor (ais3, Quantity_NOC_GREEN, Standard_True);
return 0;
}
di<<argv[1]<<"_X "<<argv[1]<<"_Y "<<argv[1]<<"_Z\n";
//try to draw them:
- TheAISContext()->Display(XLine);
- TheAISContext()->Display(YLine);
- TheAISContext()->Display(ZLine);
+ TheAISContext()->Display (XLine, Standard_False);
+ TheAISContext()->Display (YLine, Standard_False);
+ TheAISContext()->Display (ZLine, Standard_True);
return 0;
}
if ( !(anObj == myAIS) )
{
if ( !aContext.IsNull() )
- aContext->Remove(myAIS);
+ aContext->Remove (myAIS, Standard_True);
// Driver has built new AIS.
myAIS = anObj;
if ( !myAIS.IsNull() )
{
if ( !(myAIS->GetContext()).IsNull() && (myAIS->GetContext()) != aContext )
- myAIS->GetContext()->Remove(myAIS);
+ myAIS->GetContext()->Remove (myAIS, Standard_False);
if ( IsDisplayed() && aContext->IsDisplayed(myAIS) )
return;
CurDrawer->SetVIsoAspect(CopyIsoAspect(aVIso, aNbVIsos));
TheAISContext()->SetLocalAttributes
(aShape, CurDrawer, Standard_False);
- TheAISContext()->Redisplay(aShape);
+ TheAISContext()->Redisplay (aShape, Standard_False);
} else {
di << "Number of isos for " << argv[i] << " : "
<< aUIso->Number() << " " << aVIso->Number() << "\n";
IO = Handle(AIS_InteractiveObject)::DownCast(GetMapOfAIS().Find2(name));
if (!IO.IsNull()) {
if(On==1)
- Ctx->SubIntensityOn(IO);
+ Ctx->SubIntensityOn(IO, Standard_True);
else
- Ctx->SubIntensityOff(IO);
+ Ctx->SubIntensityOff(IO, Standard_True);
}
}
else return 1;
anAISContext->SetDisplayMode (aTexturedIO, AIS_Shaded, Standard_False);
if (aPreviousMode == 3)
{
- anAISContext->RecomputePrsOnly (aTexturedIO);
+ anAISContext->RecomputePrsOnly (aTexturedIO, Standard_False);
}
anAISContext->Display (aTexturedIO, Standard_True);
if (aTexturedIO->DisplayMode() == 3 || aPreviousMode == 3)
{
- anAISContext->RecomputePrsOnly (aTexturedIO);
+ anAISContext->RecomputePrsOnly (aTexturedIO, Standard_True);
}
else
{
if (aSelMode == -1)
{
- aCtx->Erase (aShape);
+ aCtx->Erase (aShape, Standard_False);
}
aCtx->Display (aShape, aDispMode, aSelMode,
Standard_False, aShape->AcceptShapeDecomposition(),
else
TheAISContext()->SetDeviationCoefficient(TheAisIO,0.0008,Standard_True);
- TheAISContext()->Redisplay(TheAisIO);
+ TheAISContext()->Redisplay (TheAisIO, Standard_True);
return 0;
}
//==============================================================================
Handle(AIS_Shape) newsh = new AIS_Shape(PickSh);
GetMapOfAIS().Bind(newsh, name);
- TheAISContext()->Display(newsh);
+ TheAISContext()->Display (newsh, Standard_True);
di<<"Nom de la shape pickee : "<<name.ToCString()<<"\n";
}
Handle(AIS_Shape) newsh = new AIS_Shape(PickSh);
GetMapOfAIS().Bind(newsh, name);
di<<"display of picke shape #"<<i<<" - nom : "<<name.ToCString()<<"\n";
- TheAISContext()->Display(newsh);
+ TheAISContext()->Display (newsh, Standard_False);
}
+ TheAISContext()->UpdateCurrentViewer();
}
}
return 0;
Handle(AIS_Shape) aNewShape = new AIS_Shape (aShape);
GetMapOfAIS().Bind (aNewShape, aCurrentName);
- TheAISContext()->Display (aNewShape);
+ TheAISContext()->Display (aNewShape, Standard_False);
}
+ TheAISContext()->UpdateCurrentViewer();
+
return 0;
}
DBRep::Set(a[1], shape);
Handle(AIS_InteractiveContext) Ctx = ViewerTest::GetAISContext();
Handle(AIS_Shape) ais = new AIS_Shape(shape);
- Ctx->Display(ais);
+ Ctx->Display (ais, Standard_True);
return 0;
}
Handle(AIS_InteractiveContext) Ctx = ViewerTest::GetAISContext();
Ctx->Erase(Start,Standard_False);
if(Ctx->IsDisplayed(AS))
- Ctx->Redisplay(AS);
+ Ctx->Redisplay (AS, Standard_True);
else
- Ctx->Display(AS);
+ Ctx->Display (AS, Standard_True);
return 0;
}
Handle(Geom_Line) myLine=new Geom_Line (p1 ,myVect );
Handle(AIS_Axis) TheAxis=new AIS_Axis (myLine );
GetMapOfAIS().Bind (TheAxis,name);
- TheAISContext()->Display(TheAxis);
+ TheAISContext()->Display(TheAxis, Standard_True);
}
// Pas d'arguments
Handle(Geom_Axis1Placement) OrigineAndVect=new Geom_Axis1Placement (A,D);
Handle(AIS_Axis) TheAxis=new AIS_Axis (OrigineAndVect);
GetMapOfAIS().Bind (TheAxis,name);
- TheAISContext()->Display(TheAxis);
+ TheAISContext()->Display (TheAxis, Standard_True);
}
else
{
Handle(Geom_Axis1Placement) OrigineAndVect=new Geom_Axis1Placement (A,D);
Handle(AIS_Axis) TheAxis=new AIS_Axis (OrigineAndVect);
GetMapOfAIS().Bind (TheAxis,name);
- TheAISContext()->Display(TheAxis);
+ TheAISContext()->Display (TheAxis, Standard_True);
}
}
Handle(Geom_Axis1Placement) OrigineAndVect=new Geom_Axis1Placement (B,D);
Handle(AIS_Axis) TheAxis=new AIS_Axis (OrigineAndVect);
GetMapOfAIS().Bind (TheAxis,name);
- TheAISContext()->Display(TheAxis);
+ TheAISContext()->Display (TheAxis, Standard_True);
}
Handle(Geom_Axis1Placement) OrigineAndVect=new Geom_Axis1Placement (B,D);
Handle(AIS_Axis) TheAxis=new AIS_Axis (OrigineAndVect);
GetMapOfAIS().Bind (TheAxis,name);
- TheAISContext()->Display(TheAxis);
+ TheAISContext()->Display (TheAxis, Standard_True);
}
Handle(Geom_CartesianPoint ) myGeomPoint= new Geom_CartesianPoint (thecoord[0],thecoord[1],thecoord[2]);
Handle(AIS_Point) myAISPoint=new AIS_Point(myGeomPoint );
GetMapOfAIS().Bind (myAISPoint,name);
- TheAISContext()->Display(myAISPoint);
+ TheAISContext()->Display (myAISPoint, Standard_True);
}
// Il n'a pas d'arguments
Handle(Geom_CartesianPoint) myGeomPoint= new Geom_CartesianPoint (A );
Handle(AIS_Point) myAISPoint = new AIS_Point (myGeomPoint );
GetMapOfAIS().Bind(myAISPoint,name);
- TheAISContext()->Display(myAISPoint);
+ TheAISContext()->Display (myAISPoint, Standard_True);
}
else
{
Handle(Geom_CartesianPoint) myGeomPointM= new Geom_CartesianPoint ( (A.X()+B.X())/2 , (A.Y()+B.Y())/2 , (A.Z()+B.Z())/2 );
Handle(AIS_Point) myAISPointM = new AIS_Point (myGeomPointM );
GetMapOfAIS().Bind(myAISPointM,name);
- TheAISContext()->Display(myAISPointM);
+ TheAISContext()->Display (myAISPointM, Standard_True);
}
}
anAISPlane->SetTypeOfSensitivity (Select3D_TypeOfSensitivity (aType));
}
}
- TheAISContext()->Display(anAISPlane);
+ TheAISContext()->Display (anAISPlane, Standard_True);
}
// The first argument is an AIS_Axis
anAISPlane->SetTypeOfSensitivity (Select3D_TypeOfSensitivity (aType));
}
}
- TheAISContext()->Display(anAISPlane);
+ TheAISContext()->Display (anAISPlane, Standard_True);
}
// The first argumnet is an AIS_Plane
anAISPlane->SetTypeOfSensitivity (Select3D_TypeOfSensitivity (aType));
}
}
- TheAISContext()->Display(anAISPlane);
+ TheAISContext()->Display (anAISPlane, Standard_True);
}
// Error
else
Handle(Geom_Plane) aGeomPlane = MkPlane.Value();
Handle(AIS_Plane) anAISPlane = new AIS_Plane (aGeomPlane);
GetMapOfAIS().Bind (anAISPlane, aName);
- TheAISContext()->Display(anAISPlane);
+ TheAISContext()->Display (anAISPlane, Standard_True);
}
}
else if (aShapes.Extent() == 3)
Handle(Geom_Plane) aGeomPlane = MkPlane.Value();
Handle(AIS_Plane) anAISPlane = new AIS_Plane (aGeomPlane);
GetMapOfAIS().Bind (anAISPlane, aName);
- TheAISContext()->Display(anAISPlane);
+ TheAISContext()->Display (anAISPlane, Standard_True);
}
else
{
Handle(Geom_Plane) aGeomPlane = MkPlane.Value();
Handle(AIS_Plane) anAISPlane = new AIS_Plane (aGeomPlane);
GetMapOfAIS().Bind (anAISPlane ,aName);
- TheAISContext()->Display(anAISPlane);
+ TheAISContext()->Display (anAISPlane, Standard_True);
}
else if (aShapeA.ShapeType() == TopAbs_FACE)
{
Handle(Geom_Plane) aGeomPlane = new Geom_Plane(aPlane);
Handle(AIS_Plane) anAISPlane = new AIS_Plane(aGeomPlane);
GetMapOfAIS().Bind (anAISPlane, aName);
- TheAISContext()->Display(anAISPlane);
+ TheAISContext()->Display (anAISPlane, Standard_True);
}
else
{
Handle(Geom_Plane) aGeomPlane = new Geom_Plane (aPlane);
Handle(AIS_Plane) aAISPlane = new AIS_Plane (aGeomPlane, A);
GetMapOfAIS().Bind (aAISPlane ,aName);
- TheAISContext()->Display(aAISPlane);
+ TheAISContext()->Display (aAISPlane, Standard_True);
}
else
{
gp_Pnt aMiddle ((Aa.X()+Ab.X() )/2 ,(Aa.Y()+Ab.Y() )/2 ,(Aa.Z()+Ab.Z() )/2 );
Handle(AIS_Plane) anAISPlane = new AIS_Plane (aGeomPlane, aMiddle);
GetMapOfAIS().Bind (anAISPlane, aName);
- TheAISContext()->Display(anAISPlane);
+ TheAISContext()->Display (anAISPlane, Standard_True);
}
else
{
// Les deux points sont OK...Construction de l'AIS_Line (en faite, le segment AB)
Handle(AIS_Line) theAISLine= new AIS_Line(myCartPointA,myCartPointB );
GetMapOfAIS().Bind(theAISLine,argv[1] );
- TheAISContext()->Display(theAISLine );
+ TheAISContext()->Display (theAISLine, Standard_True);
}
Handle(AIS_Line) theAISLine= new AIS_Line(myCartPointA,myCartPointB );
GetMapOfAIS().Bind(theAISLine,argv[1] );
- TheAISContext()->Display(theAISLine );
+ TheAISContext()->Display (theAISLine, Standard_True);
}
Handle(AIS_Line) theAISLine= new AIS_Line(myCartPointA,myCartPointB );
GetMapOfAIS().Bind(theAISLine,argv[1] );
- TheAISContext()->Display(theAISLine );
+ TheAISContext()->Display (theAISLine, Standard_True);
}
return 0;
GetMapOfAIS().Bind(aCircle, theName);
// Display the circle
- TheAISContext()->Display(aCircle);
+ TheAISContext()->Display (aCircle, Standard_True);
}
// create an AIS shape and display it
Handle(AIS_Shape) anObject = new AIS_Shape (aHlrShape);
GetMapOfAIS().Bind (anObject, aHlrName);
- aContextAIS->Display (anObject);
+ aContextAIS->Display (anObject, Standard_False);
aContextAIS->UpdateCurrentViewer ();
GetMapOfAIS().Bind (anOriginObject, aName);
// Display connected object
- TheAISContext()->Display (anOriginObject);
+ TheAISContext()->Display (anOriginObject, Standard_True);
return 0;
}
aTrsf.SetTranslation (gp_Vec (aX, aY, aZ));
anAssembly->Connect (anIObj, aTrsf);
- TheAISContext()->Display (anAssembly);
+ TheAISContext()->Display (anAssembly, Standard_False);
TheAISContext()->RecomputeSelectionOnly (anAssembly);
aContext->UpdateCurrentViewer();
GetMapOfAIS().Bind(aTriangle, aName);
// Display triangle
- TheAISContext()->Display(aTriangle);
+ TheAISContext()->Display (aTriangle, Standard_True);
return 0;
}
GetMapOfAIS().Bind(aSegment, aName);
// Display segment
- TheAISContext()->Display(aSegment);
+ TheAISContext()->Display (aSegment, Standard_True);
return 0;
}
aDrawer->SetFaceBoundaryAspect (aBoundaryAspect);
- TheAISContext()->Redisplay (anInterObj);
+ TheAISContext()->Redisplay (anInterObj, Standard_True);
return 0;
}
// Update shape presentation as aspect parameters were changed
if (isForceRedisplay)
{
- ViewerTest::GetAISContext()->Redisplay (anObject);
+ ViewerTest::GetAISContext()->Redisplay (anObject, Standard_False);
}
else
{
// Update shape presentation as aspect parameters were changed
if (isForceRedisplay)
{
- ViewerTest::GetAISContext()->Redisplay (anObject);
+ ViewerTest::GetAISContext()->Redisplay (anObject, Standard_False);
}
else
{
Handle(AIS_Relation) aRelation = Handle(AIS_Relation)::DownCast (aPickedObj);
aPoint = Get3DPointAtMousePosition();
aRelation->SetPosition (aPoint);
- TheAISContext()->Redisplay (aRelation);
+ TheAISContext()->Redisplay (aRelation, Standard_True);
}
else
{
}
aDim->SetTextPosition (aPoint);
- TheAISContext()->Redisplay (aDim);
+ TheAISContext()->Redisplay (aDim, Standard_True);
}
}
{
Handle(AIS_Relation) aRelation = Handle(AIS_Relation)::DownCast (aPickedObj);
aRelation->SetPosition (aPoint);
- TheAISContext()->Redisplay (aRelation);
+ TheAISContext()->Redisplay (aRelation, Standard_True);
}
else
{
Handle(AIS_Dimension) aDim = Handle(AIS_Dimension)::DownCast (aPickedObj);
aDim->SetTextPosition (aPoint);
- TheAISContext()->Redisplay (aDim);
+ TheAISContext()->Redisplay (aDim, Standard_True);
}
return 0;
Handle(AIS_InteractiveContext) Ctx = ViewerTest::GetAISContext();
if(Ctx->NbSelected()==0)
- Ctx->SetDisplayMode(AIS_Shaded);
+ Ctx->SetDisplayMode (AIS_Shaded, Standard_True);
else{
for(Ctx->InitSelected();Ctx->MoreSelected();Ctx->NextSelected())
Ctx->SetDisplayMode(Ctx->SelectedInteractive(),1,Standard_False);
Handle(AIS_InteractiveContext) Ctx = ViewerTest::GetAISContext();
if(Ctx->NbSelected()==0)
- Ctx->SetDisplayMode(AIS_WireFrame);
+ Ctx->SetDisplayMode (AIS_WireFrame, Standard_True);
else{
for(Ctx->InitSelected();Ctx->MoreSelected();Ctx->NextSelected())
Ctx->UnsetDisplayMode(Ctx->SelectedInteractive(),Standard_False);
std::cout << "setup WireFrame display mode" << std::endl;
Handle(AIS_InteractiveContext) Ctx = ViewerTest::GetAISContext();
if(Ctx->NbSelected()==0)
- Ctx->SetDisplayMode(AIS_WireFrame);
+ Ctx->SetDisplayMode (AIS_WireFrame, Standard_True);
else{
for(Ctx->InitSelected();Ctx->MoreSelected();Ctx->NextSelected())
Ctx->SetDisplayMode(Ctx->SelectedInteractive(),0,Standard_False);
if (!GetActiveAISManipulator().IsNull())
{
GetActiveAISManipulator()->StopTransform();
- ViewerTest::GetAISContext()->ClearSelected();
+ ViewerTest::GetAISContext()->ClearSelected (Standard_True);
}
if (ViewerTest::GetAISContext()->IsDisplayed (GetRubberBand()))
if (!GetActiveAISManipulator().IsNull())
{
GetActiveAISManipulator()->StopTransform (Standard_False);
- ViewerTest::GetAISContext()->ClearSelected();
+ ViewerTest::GetAISContext()->ClearSelected (Standard_True);
}
IsDragged = Standard_False;
}
if( DragFirst )
if( ShiftPressed )
{
- aContext->ShiftSelect();
+ aContext->ShiftSelect (Standard_True);
}
else
{
- aContext->Select();
+ aContext->Select (Standard_True);
}
else
if( ShiftPressed )
{
- aContext->ShiftSelect( min( X_ButtonPress, X_Motion ), min( Y_ButtonPress, Y_Motion ),
- max( X_ButtonPress, X_Motion ), max( Y_ButtonPress, Y_Motion ),
- ViewerTest::CurrentView());
+ aContext->ShiftSelect(Min(X_ButtonPress, X_Motion), Min(Y_ButtonPress, Y_Motion),
+ Max(X_ButtonPress, X_Motion), Max(Y_ButtonPress, Y_Motion),
+ ViewerTest::CurrentView(), Standard_True);
}
else
{
- aContext->Select( min( X_ButtonPress, X_Motion ), min( Y_ButtonPress, Y_Motion ),
- max( X_ButtonPress, X_Motion ), max( Y_ButtonPress, Y_Motion ),
- ViewerTest::CurrentView() );
+ aContext->Select(Min(X_ButtonPress, X_Motion), Min(Y_ButtonPress, Y_Motion),
+ Max(X_ButtonPress, X_Motion), Max(Y_ButtonPress, Y_Motion),
+ ViewerTest::CurrentView(), Standard_True);
}
else
VT_ProcessButton3Release();
static Handle (V3d_LineItem) aLine;
if (!aLine.IsNull())
{
- aContext->Erase (aLine);
+ aContext->Erase (aLine, Standard_False);
}
aLine = new V3d_LineItem (X1, Y1, X2, Y2,
aLineType, aWidth,
return 1;
}
- aContext->AddOrRemoveSelected(anAISObject);
+ aContext->AddOrRemoveSelected(anAISObject, Standard_True);
}
return 0;
}
aManipulator->Detach();
aMapAIS.UnBind2 (aName);
- ViewerTest::GetAISContext()->Remove (aManipulator);
+ ViewerTest::GetAISContext()->Remove (aManipulator, Standard_True);
return 0;
}
aManipulator->Transform (aT);
}
- ViewerTest::GetAISContext()->Redisplay (aManipulator);
+ ViewerTest::GetAISContext()->Redisplay (aManipulator, Standard_True);
return 0;
}
aDrawer->SetFaceBoundaryAspect (aBoundaryAspect);
- aContext->Redisplay (anInteractive);
+ aContext->Redisplay (anInteractive, Standard_True);
return 0;
}
if( aContext.IsNull() )
di << "The context is null\n";
else
- aContext->Redisplay( aMesh );
+ aContext->Redisplay (aMesh, Standard_True);
}
}
return 0;
if( aContext.IsNull() )
di << "The context is null\n";
else
- aContext->Redisplay( aMesh );
+ aContext->Redisplay (aMesh, Standard_True);
}
}
return 0;
if( aContext.IsNull() )
di << "The context is null\n";
else
- aContext->Redisplay( aMesh );
+ aContext->Redisplay (aMesh, Standard_True);
}
}
return 0;
}
else
{
- aContext->Redisplay (aMesh);
+ aContext->Redisplay (aMesh, Standard_True);
}
}
}
}
Standard_ENABLE_DEPRECATION_WARNINGS
- aContext->Display( aMesh );
+ aContext->Display (aMesh, Standard_True);
}
}
}
}
Standard_ENABLE_DEPRECATION_WARNINGS
- aContext->Erase( aMesh );
+ aContext->Erase (aMesh, Standard_True);
}
}
else
}
}
}
- aContext->ClearSelected();
+ aContext->ClearSelected (Standard_False);
aMesh->SetHiddenNodes( aHiddenNodes );
aMesh->SetHiddenElems( aHiddenElements );
- aContext->Redisplay( aMesh );
+ aContext->Redisplay (aMesh, Standard_True);
}
return 0;
}
aMesh->SetHiddenNodes( aHiddenNodes );
aMesh->SetHiddenElems( aHiddenElements );
- aContext->Redisplay( aMesh );
+ aContext->Redisplay (aMesh, Standard_True);
}
return 0;
{
aMesh->SetHiddenNodes( new TColStd_HPackedMapOfInteger() );
aMesh->SetHiddenElems( new TColStd_HPackedMapOfInteger() );
- aContext->Redisplay( aMesh );
+ aContext->Redisplay (aMesh, Standard_True);
}
return 0;
aMesh->GetDrawer()->SetBoolean (MeshVS_DA_ColorReflection, aReflection != 0);
- anIC->Redisplay( aMesh );
+ anIC->Redisplay (aMesh, Standard_True);
}
else
{
aMesh->GetDrawer()->SetDouble ( MeshVS_DA_VectorArrowPart, anArrowPart );
}
- anIC->Redisplay( aMesh );
+ anIC->Redisplay (aMesh, Standard_True);
return 0;
}
aMesh->SetDataSource(aDefDS);
- anIC->Redisplay( aMesh );
+ anIC->Redisplay (aMesh, Standard_False);
Handle( V3d_View ) aView = ViewerTest::CurrentView();
if ( !aView.IsNull() )
}
aDrawer->SetDouble( MeshVS_DA_EdgeWidth, aWidth );
- anIC->Redisplay( aMesh );
+ anIC->Redisplay (aMesh, Standard_True);
}
catch ( Standard_Failure )
{