mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-03 17:56:21 +03:00
0028088: Visualization, AIS_InteractiveContext - drop default value for Update Viewer parameter
This commit is contained in:
parent
9bcfd6f649
commit
0577ae8ca4
@ -1178,6 +1178,28 @@ Management of highlight attributes has been revised and might require modificati
|
||||
* 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.
|
||||
* The result of Boolean operations on arguments of collection types (WIRE/SHELL/COMPSOLID) is now filtered from duplicating containers.
|
||||
|
@ -222,7 +222,7 @@ public:
|
||||
{
|
||||
if (!myAISContext().IsNull())
|
||||
{
|
||||
myAISContext()->Select(theX1, theY1, theX2, theY2, myView());
|
||||
myAISContext()->Select (theX1, theY1, theX2, theY2, myView(), Standard_True);
|
||||
}
|
||||
}
|
||||
|
||||
@ -233,7 +233,7 @@ public:
|
||||
{
|
||||
if (!myAISContext().IsNull())
|
||||
{
|
||||
myAISContext()->Select();
|
||||
myAISContext()->Select (Standard_True);
|
||||
}
|
||||
}
|
||||
|
||||
@ -244,7 +244,7 @@ public:
|
||||
{
|
||||
if ((!myAISContext().IsNull()) && (!myView().IsNull()))
|
||||
{
|
||||
myAISContext()->MoveTo(theX, theY, myView());
|
||||
myAISContext()->MoveTo (theX, theY, myView(), Standard_True);
|
||||
}
|
||||
}
|
||||
|
||||
@ -255,7 +255,7 @@ public:
|
||||
{
|
||||
if ((!myAISContext().IsNull()) && (!myView().IsNull()))
|
||||
{
|
||||
myAISContext()->ShiftSelect(theX1, theY1, theX2, theY2, myView());
|
||||
myAISContext()->ShiftSelect (theX1, theY1, theX2, theY2, myView(), Standard_True);
|
||||
}
|
||||
}
|
||||
|
||||
@ -266,7 +266,7 @@ public:
|
||||
{
|
||||
if (!myAISContext().IsNull())
|
||||
{
|
||||
myAISContext()->ShiftSelect();
|
||||
myAISContext()->ShiftSelect (Standard_True);
|
||||
}
|
||||
}
|
||||
|
||||
@ -463,15 +463,15 @@ public:
|
||||
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();
|
||||
@ -487,10 +487,11 @@ public:
|
||||
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>
|
||||
@ -527,15 +528,15 @@ public:
|
||||
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;
|
||||
@ -575,8 +576,8 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
myAISContext()->EraseSelected (Standard_True);
|
||||
myAISContext()->ClearCurrents();
|
||||
myAISContext()->EraseSelected (Standard_False);
|
||||
myAISContext()->ClearSelected (Standard_True);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -596,9 +597,9 @@ public:
|
||||
{
|
||||
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();
|
||||
}
|
||||
@ -612,10 +613,11 @@ public:
|
||||
{
|
||||
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>
|
||||
@ -627,8 +629,8 @@ public:
|
||||
{
|
||||
return false;
|
||||
}
|
||||
myAISContext()->InitCurrent();
|
||||
return myAISContext()->MoreCurrent() != Standard_False;
|
||||
myAISContext()->InitSelected();
|
||||
return myAISContext()->MoreSelected() != Standard_False;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -643,13 +645,13 @@ public:
|
||||
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;
|
||||
}
|
||||
@ -753,11 +755,8 @@ public:
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if(myAISContext()->HasOpenedContext())
|
||||
{
|
||||
myAISContext()->CloseLocalContext();
|
||||
}
|
||||
myAISContext()->Display(new AIS_Shape(aShape));
|
||||
|
||||
myAISContext()->Display (new AIS_Shape (aShape), Standard_True);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -786,8 +785,9 @@ public:
|
||||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -813,7 +813,7 @@ public:
|
||||
{
|
||||
aReader.TransferRoots();
|
||||
TopoDS_Shape aShape = aReader.OneShape();
|
||||
myAISContext()->Display(new AIS_Shape(aShape));
|
||||
myAISContext()->Display (new AIS_Shape (aShape), Standard_False);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -830,13 +830,13 @@ public:
|
||||
/// <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;
|
||||
}
|
||||
@ -850,9 +850,9 @@ public:
|
||||
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 );
|
||||
@ -881,9 +881,9 @@ public:
|
||||
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 );
|
||||
@ -903,9 +903,9 @@ public:
|
||||
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() )
|
||||
@ -932,9 +932,9 @@ public:
|
||||
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() )
|
||||
|
@ -238,7 +238,7 @@ public:
|
||||
{
|
||||
if (!myAISContext().IsNull())
|
||||
{
|
||||
myAISContext()->Select (theX1, theY1, theX2, theY2, myView());
|
||||
myAISContext()->Select (theX1, theY1, theX2, theY2, myView(), Standard_True);
|
||||
}
|
||||
}
|
||||
|
||||
@ -249,7 +249,7 @@ public:
|
||||
{
|
||||
if (!myAISContext().IsNull())
|
||||
{
|
||||
myAISContext()->Select();
|
||||
myAISContext()->Select (Standard_True);
|
||||
}
|
||||
}
|
||||
|
||||
@ -260,7 +260,7 @@ public:
|
||||
{
|
||||
if (!myAISContext().IsNull() && !myView().IsNull())
|
||||
{
|
||||
myAISContext()->MoveTo (theX, theY, myView());
|
||||
myAISContext()->MoveTo (theX, theY, myView(), Standard_True);
|
||||
}
|
||||
}
|
||||
|
||||
@ -271,7 +271,7 @@ public:
|
||||
{
|
||||
if (!myAISContext().IsNull() && !myView().IsNull())
|
||||
{
|
||||
myAISContext()->ShiftSelect (theX1, theY1, theX2, theY2, myView());
|
||||
myAISContext()->ShiftSelect (theX1, theY1, theX2, theY2, myView(), Standard_True);
|
||||
}
|
||||
}
|
||||
|
||||
@ -282,7 +282,7 @@ public:
|
||||
{
|
||||
if (!myAISContext().IsNull())
|
||||
{
|
||||
myAISContext()->ShiftSelect();
|
||||
myAISContext()->ShiftSelect (Standard_True);
|
||||
}
|
||||
}
|
||||
|
||||
@ -465,16 +465,15 @@ public:
|
||||
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();
|
||||
@ -491,10 +490,11 @@ public:
|
||||
}
|
||||
|
||||
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>
|
||||
@ -540,16 +540,16 @@ public:
|
||||
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);
|
||||
@ -577,8 +577,8 @@ public:
|
||||
return;
|
||||
}
|
||||
|
||||
myAISContext()->EraseSelected (Standard_True);
|
||||
myAISContext()->ClearCurrents();
|
||||
myAISContext()->EraseSelected (Standard_False);
|
||||
myAISContext()->ClearSelected (Standard_True);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -598,9 +598,9 @@ public:
|
||||
{
|
||||
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();
|
||||
}
|
||||
@ -614,10 +614,11 @@ public:
|
||||
{
|
||||
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>
|
||||
@ -629,8 +630,8 @@ public:
|
||||
{
|
||||
return false;
|
||||
}
|
||||
myAISContext()->InitCurrent();
|
||||
return myAISContext()->MoreCurrent() != Standard_False;
|
||||
myAISContext()->InitSelected();
|
||||
return myAISContext()->MoreSelected() != Standard_False;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -645,13 +646,13 @@ public:
|
||||
|
||||
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;
|
||||
}
|
||||
@ -729,14 +730,11 @@ public:
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
@ -765,8 +763,9 @@ public:
|
||||
{
|
||||
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;
|
||||
@ -797,13 +796,13 @@ public:
|
||||
/// <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);
|
||||
}
|
||||
@ -816,9 +815,9 @@ public:
|
||||
{
|
||||
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;
|
||||
@ -842,9 +841,9 @@ public:
|
||||
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;
|
||||
@ -866,9 +865,9 @@ public:
|
||||
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;
|
||||
@ -890,9 +889,9 @@ public:
|
||||
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;
|
||||
|
@ -20,13 +20,13 @@ void GeomSources::PreProcess(CGeometryDoc* aDoc,DisplayType aDisplayType)
|
||||
{
|
||||
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();
|
||||
}
|
||||
|
||||
@ -42,8 +42,8 @@ void GeomSources::PreProcess(CGeometryDoc* aDoc,DisplayType aDisplayType)
|
||||
|
||||
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);
|
||||
|
||||
@ -986,7 +986,7 @@ if(NbResults>0){ \n\
|
||||
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)
|
||||
@ -2495,13 +2495,13 @@ else
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
@ -4140,12 +4140,12 @@ aBox.Get( aXmin, aYmin,aZmin, aXmax,aYmax,aZmax); \n\
|
||||
|
||||
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);
|
||||
|
||||
|
@ -261,7 +261,7 @@ void CGeometryDoc::MoveEvent2D(const Standard_Integer x,
|
||||
//View is not updated automatically in ConvertToGrid
|
||||
aView->Update();
|
||||
}
|
||||
this->myAISContext2D->MoveTo(x, y, aView);
|
||||
this->myAISContext2D->MoveTo (x, y, aView, Standard_True);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------
|
||||
@ -352,7 +352,7 @@ void CGeometryDoc::InputEvent (const Standard_Integer /*theMouseX*/,
|
||||
const Standard_Integer /*theMouseY*/,
|
||||
const Handle(V3d_View)& /*theView*/)
|
||||
{
|
||||
myAISContext->Select();
|
||||
myAISContext->Select (Standard_True);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------
|
||||
@ -1177,7 +1177,7 @@ void CGeometryDoc::OnSimplify()
|
||||
myCResultDialog.SetText(initfile);
|
||||
return;
|
||||
}
|
||||
myAISContext->SetDisplayMode(AIS_Shaded);
|
||||
myAISContext->SetDisplayMode(AIS_Shaded, Standard_True);
|
||||
simplify(aShape);
|
||||
}
|
||||
|
||||
@ -1541,7 +1541,7 @@ Handle(AIS_InteractiveObject) CGeometryDoc::drawSurface
|
||||
Fit();
|
||||
}
|
||||
else
|
||||
myAISContext->Display (aGraphicSurface);
|
||||
myAISContext->Display (aGraphicSurface, Standard_True);
|
||||
}
|
||||
|
||||
return aGraphicSurface;
|
||||
@ -1578,7 +1578,7 @@ Handle(AIS_Point) CGeometryDoc::drawPoint
|
||||
myAISContext->SetColor (aGraphicPoint, theColor, toDisplay);
|
||||
if (toDisplay)
|
||||
{
|
||||
myAISContext->Display (aGraphicPoint);
|
||||
myAISContext->Display (aGraphicPoint, Standard_True);
|
||||
//COCCDemoDoc::Fit();
|
||||
}
|
||||
|
||||
@ -1601,7 +1601,7 @@ Handle(AIS_Shape) CGeometryDoc::drawShape
|
||||
Fit();
|
||||
}
|
||||
else
|
||||
myAISContext->Display (aGraphicShape);
|
||||
myAISContext->Display (aGraphicShape, Standard_True);
|
||||
}
|
||||
|
||||
return aGraphicShape;
|
||||
|
@ -106,7 +106,7 @@ void CModelingDoc::OnMirror()
|
||||
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);
|
||||
@ -143,7 +143,7 @@ void CModelingDoc::OnMirroraxis()
|
||||
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);
|
||||
@ -184,7 +184,7 @@ void CModelingDoc::OnRotate()
|
||||
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);
|
||||
@ -224,7 +224,7 @@ void CModelingDoc::OnScale()
|
||||
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);
|
||||
@ -268,7 +268,7 @@ void CModelingDoc::OnTranslation()
|
||||
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);
|
||||
@ -311,7 +311,7 @@ void CModelingDoc::OnDisplacement()
|
||||
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);
|
||||
@ -353,7 +353,7 @@ void CModelingDoc::OnDeform()
|
||||
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);
|
||||
@ -397,7 +397,7 @@ void CModelingDoc::OnBox()
|
||||
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);
|
||||
@ -428,7 +428,7 @@ void CModelingDoc::OnCylinder()
|
||||
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();
|
||||
@ -462,7 +462,7 @@ void CModelingDoc::OnCone()
|
||||
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);
|
||||
@ -494,7 +494,7 @@ void CModelingDoc::OnSphere()
|
||||
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();
|
||||
@ -539,7 +539,7 @@ void CModelingDoc::OnTorus()
|
||||
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();
|
||||
@ -578,7 +578,7 @@ void CModelingDoc::OnWedge()
|
||||
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();
|
||||
@ -609,7 +609,7 @@ void CModelingDoc::OnPrism()
|
||||
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.));
|
||||
@ -690,7 +690,7 @@ void CModelingDoc::OnRevol()
|
||||
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.));
|
||||
@ -789,7 +789,7 @@ void CModelingDoc::OnPipe()
|
||||
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);
|
||||
@ -851,7 +851,7 @@ void CModelingDoc::OnThru()
|
||||
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.);
|
||||
@ -977,7 +977,7 @@ void CModelingDoc::OnEvolved()
|
||||
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;
|
||||
@ -1029,7 +1029,7 @@ void CModelingDoc::OnDraft()
|
||||
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();
|
||||
@ -1083,7 +1083,7 @@ void CModelingDoc::OnCut()
|
||||
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();
|
||||
@ -1152,7 +1152,7 @@ void CModelingDoc::OnFuse()
|
||||
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);
|
||||
@ -1207,7 +1207,7 @@ void CModelingDoc::OnCommon()
|
||||
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));
|
||||
@ -1270,7 +1270,7 @@ void CModelingDoc::OnSection()
|
||||
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();
|
||||
@ -1304,13 +1304,14 @@ for(i;i<=3;i++) {
|
||||
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\
|
||||
@ -1336,7 +1337,7 @@ void CModelingDoc::OnPsection()
|
||||
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();
|
||||
@ -1389,7 +1390,7 @@ void CModelingDoc::OnBlend()
|
||||
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();
|
||||
@ -1509,7 +1510,7 @@ void CModelingDoc::OnEvolvedblend()
|
||||
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();
|
||||
@ -1707,7 +1708,7 @@ void CModelingDoc::OnChamf()
|
||||
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();
|
||||
@ -1768,7 +1769,7 @@ void CModelingDoc::OnPrismLocal()
|
||||
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);
|
||||
@ -1853,8 +1854,8 @@ void CModelingDoc::OnPrismLocal()
|
||||
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 ("\
|
||||
@ -1941,7 +1942,7 @@ void CModelingDoc::OnDprismLocal()
|
||||
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();
|
||||
@ -2023,7 +2024,7 @@ void CModelingDoc::OnRevolLocal()
|
||||
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();
|
||||
|
||||
@ -2072,7 +2073,7 @@ void CModelingDoc::OnRevolLocal()
|
||||
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;
|
||||
@ -2124,7 +2125,7 @@ void CModelingDoc::OnGlueLocal()
|
||||
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();
|
||||
|
||||
@ -2170,7 +2171,7 @@ void CModelingDoc::OnGlueLocal()
|
||||
|
||||
ais1->Set(res1);
|
||||
|
||||
myAISContext->Redisplay(ais1);
|
||||
myAISContext->Redisplay (ais1, Standard_False);
|
||||
myAISContext->SetSelected(anIO1,Standard_False);
|
||||
Fit();
|
||||
Sleep(1000);
|
||||
@ -2288,7 +2289,7 @@ void CModelingDoc::OnPipeLocal()
|
||||
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);
|
||||
@ -2396,7 +2397,7 @@ void CModelingDoc::OnLinearLocal()
|
||||
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.);
|
||||
@ -2439,7 +2440,7 @@ void CModelingDoc::OnLinearLocal()
|
||||
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 ("\
|
||||
@ -2482,7 +2483,7 @@ void CModelingDoc::OnSplitLocal()
|
||||
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();
|
||||
@ -2571,13 +2572,13 @@ void CModelingDoc::OnThickLocal()
|
||||
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;
|
||||
@ -2630,7 +2631,7 @@ void CModelingDoc::OnOffsetLocal()
|
||||
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();
|
||||
@ -2670,9 +2671,9 @@ void CModelingDoc::OnOffsetLocal()
|
||||
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 ("\
|
||||
@ -2706,7 +2707,7 @@ void CModelingDoc::OnVertex()
|
||||
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;
|
||||
@ -2752,7 +2753,7 @@ void CModelingDoc::OnEdge()
|
||||
myAISContext->DisplayedObjects(aList);
|
||||
AIS_ListIteratorOfListOfInteractive aListIterator;
|
||||
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
|
||||
myAISContext->Remove(aListIterator.Value());
|
||||
myAISContext->Remove (aListIterator.Value(), Standard_False);
|
||||
}
|
||||
|
||||
|
||||
@ -2896,7 +2897,7 @@ void CModelingDoc::OnWire()
|
||||
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,
|
||||
@ -3050,7 +3051,7 @@ void CModelingDoc::OnFace()
|
||||
myAISContext->DisplayedObjects(aList);
|
||||
AIS_ListIteratorOfListOfInteractive aListIterator;
|
||||
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
|
||||
myAISContext->Remove(aListIterator.Value());
|
||||
myAISContext->Remove (aListIterator.Value(), Standard_False);
|
||||
}
|
||||
|
||||
|
||||
@ -3269,7 +3270,7 @@ void CModelingDoc::OnShell()
|
||||
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);
|
||||
@ -3309,15 +3310,15 @@ void CModelingDoc::OnShell()
|
||||
|
||||
|
||||
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);
|
||||
|
||||
@ -3372,7 +3373,7 @@ void CModelingDoc::OnCompound()
|
||||
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;
|
||||
@ -3394,7 +3395,7 @@ void CModelingDoc::OnCompound()
|
||||
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();
|
||||
@ -3436,7 +3437,7 @@ void CModelingDoc::OnSewing()
|
||||
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);
|
||||
@ -3550,7 +3551,7 @@ void CModelingDoc::OnBuilder()
|
||||
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
|
||||
@ -3954,8 +3955,8 @@ void CModelingDoc::OnBuilder()
|
||||
|
||||
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);
|
||||
|
||||
@ -4088,7 +4089,7 @@ void CModelingDoc::OnGeometrie()
|
||||
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
|
||||
@ -4197,7 +4198,7 @@ void CModelingDoc::OnExplorer()
|
||||
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();
|
||||
@ -4272,7 +4273,7 @@ void CModelingDoc::OnExplorer()
|
||||
j+=15;
|
||||
}
|
||||
//myAISContext->Erase(theBox,Standard_True,Standard_False);
|
||||
myAISContext->Remove(theBox);
|
||||
myAISContext->Remove(theBox, Standard_False);
|
||||
Fit();
|
||||
Sleep (500);
|
||||
|
||||
@ -4304,7 +4305,7 @@ void CModelingDoc::OnValid()
|
||||
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();
|
||||
@ -4340,7 +4341,7 @@ void CModelingDoc::OnLinear()
|
||||
myAISContext->DisplayedObjects(aList);
|
||||
AIS_ListIteratorOfListOfInteractive aListIterator;
|
||||
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
|
||||
myAISContext->Remove(aListIterator.Value());
|
||||
myAISContext->Remove (aListIterator.Value(), Standard_False);
|
||||
}
|
||||
|
||||
|
||||
@ -4436,7 +4437,7 @@ void CModelingDoc::OnSurface()
|
||||
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);
|
||||
@ -4552,7 +4553,7 @@ void CModelingDoc::OnVolume()
|
||||
myAISContext->DisplayedObjects(aList);
|
||||
AIS_ListIteratorOfListOfInteractive aListIterator;
|
||||
for(aListIterator.Initialize(aList);aListIterator.More();aListIterator.Next()){
|
||||
myAISContext->Remove(aListIterator.Value());
|
||||
myAISContext->Remove (aListIterator.Value(), Standard_False);
|
||||
}
|
||||
|
||||
|
||||
@ -4634,7 +4635,7 @@ void CModelingDoc::OnButtonFill()
|
||||
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"); }
|
||||
@ -4645,7 +4646,7 @@ void CModelingDoc::OnButtonFill()
|
||||
if(OnFileImportBrep_WithInitDir (L"HoleFilling") == 1)
|
||||
return;
|
||||
myAISContext->DisplayedObjects(LI);
|
||||
myAISContext->SetSelected(LI.First());
|
||||
myAISContext->SetSelected(LI.First(), Standard_True);
|
||||
OnButtonFill();
|
||||
return;
|
||||
}
|
||||
@ -4759,11 +4760,11 @@ void CModelingDoc::OnStopStop()
|
||||
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()
|
||||
@ -4782,11 +4783,12 @@ 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();
|
||||
@ -4818,14 +4820,14 @@ Please, select a face to continue\nthe creation of a tangent surface.");
|
||||
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();
|
||||
@ -4839,7 +4841,7 @@ void CModelingDoc::InputEvent(const Standard_Integer /*x*/,
|
||||
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()) {
|
||||
@ -4851,9 +4853,9 @@ void CModelingDoc::InputEvent(const Standard_Integer /*x*/,
|
||||
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());
|
||||
@ -5050,10 +5052,10 @@ void CModelingDoc::InputEvent(const Standard_Integer /*x*/,
|
||||
}
|
||||
|
||||
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
|
||||
|
@ -56,7 +56,7 @@ void CViewer2dDoc::Dump(CDumpContext& dc) const
|
||||
|
||||
void CViewer2dDoc::OnBUTTONErase()
|
||||
{
|
||||
myAISContext->EraseAll();
|
||||
myAISContext->EraseAll (Standard_True);
|
||||
}
|
||||
|
||||
void CViewer2dDoc::OnBUTTONTestText()
|
||||
@ -196,7 +196,7 @@ void CViewer2dDoc::OnBUTTONTestLine()
|
||||
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);
|
||||
@ -212,7 +212,7 @@ void CViewer2dDoc::OnBUTTONTestLine()
|
||||
void CViewer2dDoc::OnBUTTONTestFace()
|
||||
{
|
||||
//erase all
|
||||
myAISContext->EraseAll();
|
||||
myAISContext->EraseAll (Standard_True);
|
||||
|
||||
CFileDialog dlg(TRUE,
|
||||
NULL,
|
||||
@ -269,8 +269,8 @@ void CViewer2dDoc::OnBUTTONTestRect()
|
||||
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.));
|
||||
@ -279,8 +279,8 @@ void CViewer2dDoc::OnBUTTONTestRect()
|
||||
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
|
||||
@ -323,7 +323,7 @@ void CViewer2dDoc::OnBUTTONTestImage()
|
||||
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) ;
|
||||
@ -355,7 +355,7 @@ void CViewer2dDoc::OnBUTTONMultipleImage()
|
||||
TCollection_AsciiString aFileName ((const wchar_t* )aFilePath);
|
||||
|
||||
//erase viewer
|
||||
myAISContext->EraseAll();
|
||||
myAISContext->EraseAll (Standard_False);
|
||||
|
||||
//create images
|
||||
{ // 1
|
||||
|
@ -81,7 +81,7 @@ void CModelClippingDlg::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBa
|
||||
if (m_ModelClippingONOFF)
|
||||
{
|
||||
myDoc->GetAISContext()->SetLocation (myShape, TopLoc_Location (myTrsf));
|
||||
myDoc->GetAISContext()->Redisplay (myShape);
|
||||
myDoc->GetAISContext()->Redisplay (myShape, Standard_True);
|
||||
myView->Update();
|
||||
}
|
||||
else
|
||||
@ -141,7 +141,7 @@ BOOL CModelClippingDlg::OnInitDialog()
|
||||
|
||||
myClippingPlane->SetOn (Standard_True);
|
||||
|
||||
myDoc->GetAISContext()->Display (myShape);
|
||||
myDoc->GetAISContext()->Display (myShape, Standard_True);
|
||||
}
|
||||
|
||||
UpdateData (FALSE);
|
||||
@ -172,7 +172,7 @@ void CModelClippingDlg::OnChangeEditModelclippingZ()
|
||||
if (m_ModelClippingONOFF)
|
||||
{
|
||||
myDoc->GetAISContext()->SetLocation (myShape, TopLoc_Location (myTrsf));
|
||||
myDoc->GetAISContext()->Redisplay (myShape);
|
||||
myDoc->GetAISContext()->Redisplay (myShape, Standard_False);
|
||||
myView->Update();
|
||||
}
|
||||
else
|
||||
@ -223,14 +223,14 @@ void CModelClippingDlg::OnCheckModelclippingonoff()
|
||||
|
||||
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();
|
||||
@ -275,7 +275,7 @@ void CModelClippingDlg::OnCancel()
|
||||
|
||||
if (!myShape.IsNull())
|
||||
{
|
||||
myDoc->GetAISContext()->Remove (myShape);
|
||||
myDoc->GetAISContext()->Remove (myShape, Standard_False);
|
||||
}
|
||||
|
||||
myView->Update();
|
||||
@ -291,7 +291,7 @@ void CModelClippingDlg::OnOK()
|
||||
{
|
||||
if (!myShape.IsNull())
|
||||
{
|
||||
myDoc->GetAISContext()->Remove (myShape);
|
||||
myDoc->GetAISContext()->Remove (myShape, Standard_True);
|
||||
}
|
||||
|
||||
CDialog::OnOK();
|
||||
|
@ -100,7 +100,7 @@ Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawSurface
|
||||
CViewer3dDoc::Fit();
|
||||
}
|
||||
else
|
||||
getAISContext()->Display (aGraphicSurface);
|
||||
getAISContext()->Display (aGraphicSurface, Standard_True);
|
||||
}
|
||||
|
||||
return aGraphicSurface;
|
||||
@ -125,7 +125,7 @@ Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawCurve
|
||||
CViewer3dDoc::Fit();
|
||||
}
|
||||
else
|
||||
getAISContext()->Display (aGraphicCurve);
|
||||
getAISContext()->Display (aGraphicCurve, Standard_True);
|
||||
}
|
||||
|
||||
return aGraphicCurve;
|
||||
@ -172,7 +172,7 @@ Handle(AIS_Point) OCCDemo_Presentation::drawPoint
|
||||
|
||||
getAISContext()->SetColor (aGraphicPoint, theColor, toDisplay);
|
||||
if (toDisplay) {
|
||||
getAISContext()->Display (aGraphicPoint);
|
||||
getAISContext()->Display (aGraphicPoint, Standard_True);
|
||||
//COCCDemoDoc::Fit();
|
||||
}
|
||||
|
||||
@ -210,7 +210,7 @@ Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawVector
|
||||
CViewer3dDoc::Fit();
|
||||
}
|
||||
else
|
||||
getAISContext()->Display (aGraphicCurve);
|
||||
getAISContext()->Display (aGraphicCurve, Standard_True);
|
||||
}
|
||||
|
||||
return aGraphicCurve;
|
||||
@ -231,7 +231,7 @@ Handle(AIS_Shape) OCCDemo_Presentation::drawShape
|
||||
CViewer3dDoc::Fit();
|
||||
}
|
||||
else
|
||||
getAISContext()->Display (aGraphicShape);
|
||||
getAISContext()->Display (aGraphicShape, Standard_True);
|
||||
}
|
||||
|
||||
return aGraphicShape;
|
||||
@ -251,7 +251,7 @@ Handle(AIS_Shape) OCCDemo_Presentation::drawShape
|
||||
CViewer3dDoc::Fit();
|
||||
}
|
||||
else
|
||||
getAISContext()->Display (aGraphicShape);
|
||||
getAISContext()->Display (aGraphicShape, Standard_True);
|
||||
}
|
||||
|
||||
return aGraphicShape;
|
||||
|
@ -56,7 +56,7 @@ void TexturesExt_Presentation::DoSample()
|
||||
{
|
||||
((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
|
||||
@ -299,7 +299,7 @@ void TexturesExt_Presentation::sampleTerrain()
|
||||
aTransform.Perform(aFaces(1));
|
||||
aShape = aTransform;
|
||||
|
||||
getAISContext()->Display(Texturize(aShape, "terrain.gif"));
|
||||
getAISContext()->Display (Texturize (aShape, "terrain.gif"), Standard_True);
|
||||
}
|
||||
|
||||
|
||||
|
@ -153,10 +153,10 @@ void CViewer3dDoc::OnBox()
|
||||
|
||||
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\
|
||||
");
|
||||
@ -172,9 +172,9 @@ void CViewer3dDoc::OnCylinder()
|
||||
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\
|
||||
@ -193,10 +193,10 @@ void CViewer3dDoc::OnSphere()
|
||||
|
||||
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\
|
||||
");
|
||||
@ -212,10 +212,10 @@ void CViewer3dDoc::OnRemoveAll()
|
||||
|
||||
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();
|
||||
@ -240,10 +240,10 @@ void CViewer3dDoc::OnOverlappedBox()
|
||||
|
||||
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\
|
||||
@ -270,10 +270,10 @@ void CViewer3dDoc::OnOverlappedCylinder()
|
||||
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\
|
||||
@ -301,11 +301,11 @@ void CViewer3dDoc::OnOverlappedSphere()
|
||||
|
||||
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\
|
||||
@ -506,7 +506,7 @@ void CViewer3dDoc::InputEvent(const Standard_Integer /*x*/,
|
||||
|
||||
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)
|
||||
@ -537,7 +537,7 @@ void CViewer3dDoc::InputEvent(const Standard_Integer /*x*/,
|
||||
Handle(AIS_InteractiveObject) aSelectedObject = myAISContext->SelectedInteractive();
|
||||
Handle(User_Cylinder)::DownCast (aSelectedObject)->SetColor (CSFColor.Name());
|
||||
|
||||
myAISContext->Redisplay (aSelectedObject);
|
||||
myAISContext->Redisplay (aSelectedObject, Standard_True);
|
||||
myState = -1;
|
||||
}
|
||||
}
|
||||
@ -599,8 +599,10 @@ void CViewer3dDoc::OnObjectColoredMesh()
|
||||
{
|
||||
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)
|
||||
@ -635,14 +637,14 @@ void CViewer3dDoc::OnOptionsTrihedronDynamicTrihedron()
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -800,7 +802,7 @@ void CViewer3dDoc::OnFillet3d()
|
||||
}
|
||||
|
||||
aSelInteractive ->Set (aNewShape);
|
||||
myAISContext->Redisplay (aSelInteractive);
|
||||
myAISContext->Redisplay (aSelInteractive, Standard_True);
|
||||
}
|
||||
|
||||
myCResultDialog.SetTitle("Make a fillet");
|
||||
@ -832,7 +834,7 @@ void CViewer3dDoc::OnCircle()
|
||||
// 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"
|
||||
@ -850,7 +852,7 @@ void CViewer3dDoc::OnLine()
|
||||
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"
|
||||
@ -894,8 +896,8 @@ BOOL CViewer3dDoc::OnNewDocument()
|
||||
// (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)
|
||||
@ -954,14 +956,14 @@ void CViewer3dDoc::DoSample()
|
||||
|
||||
void CViewer3dDoc::OnBUTTONStart()
|
||||
{
|
||||
myAISContext->EraseAll();
|
||||
myAISContext->EraseAll (Standard_True);
|
||||
myPresentation->FirstSample();
|
||||
DoSample();
|
||||
}
|
||||
|
||||
void CViewer3dDoc::OnBUTTONEnd()
|
||||
{
|
||||
myAISContext->EraseAll();
|
||||
myAISContext->EraseAll (Standard_True);
|
||||
myPresentation->LastSample();
|
||||
DoSample();
|
||||
}
|
||||
|
@ -422,7 +422,7 @@ GetDocument()->UpdateResultMessageDlg("SetPosition",Message);
|
||||
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;
|
||||
|
||||
@ -447,7 +447,7 @@ GetDocument()->UpdateResultMessageDlg("SetAngle",Message);
|
||||
}
|
||||
break;
|
||||
case CurAction3d_EndSpotLight :
|
||||
GetDocument()->GetAISContext()->Erase(spotConeShape);
|
||||
GetDocument()->GetAISContext()->Erase (spotConeShape, Standard_True);
|
||||
((OCC_MainFrame*)AfxGetMainWnd())->SetStatusMessage("Ready");
|
||||
myCurrentMode = CurAction3d_Nothing;
|
||||
break;
|
||||
@ -457,7 +457,7 @@ GetDocument()->UpdateResultMessageDlg("SetAngle",Message);
|
||||
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);
|
||||
@ -474,7 +474,7 @@ GetDocument()->UpdateResultMessageDlg("SetDirection",Message);
|
||||
}
|
||||
break;
|
||||
case CurAction3d_EndDirectionalLight:
|
||||
GetDocument()->GetAISContext()->Erase(directionalEdgeShape);
|
||||
GetDocument()->GetAISContext()->Erase (directionalEdgeShape, Standard_True);
|
||||
((OCC_MainFrame*)AfxGetMainWnd())->SetStatusMessage("Ready");
|
||||
myCurrentMode = CurAction3d_Nothing;
|
||||
break;
|
||||
@ -1175,18 +1175,18 @@ void CViewer3dView::RedrawVisMode()
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -45,8 +45,9 @@ void CColoredShapes::Display(Handle(AIS_InteractiveContext)& anAIScontext)
|
||||
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();
|
||||
}
|
||||
|
@ -224,7 +224,7 @@ void CImportExportDoc::OnBox()
|
||||
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.);
|
||||
@ -244,7 +244,7 @@ void CImportExportDoc::OnCylinder()
|
||||
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.);
|
||||
|
@ -74,7 +74,7 @@ COcafDoc::~COcafDoc()
|
||||
|
||||
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
|
||||
@ -1107,7 +1107,7 @@ BOOL COcafDoc::OnOpenDocument(LPCTSTR lpszPathName)
|
||||
|
||||
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)
|
||||
|
@ -101,7 +101,7 @@ Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawSurface
|
||||
CTriangulationDoc::Fit();
|
||||
}
|
||||
else
|
||||
getAISContext()->Display (aGraphicSurface);
|
||||
getAISContext()->Display (aGraphicSurface, Standard_True);
|
||||
}
|
||||
|
||||
return aGraphicSurface;
|
||||
@ -126,7 +126,7 @@ Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawCurve
|
||||
CTriangulationDoc::Fit();
|
||||
}
|
||||
else
|
||||
getAISContext()->Display (aGraphicCurve);
|
||||
getAISContext()->Display (aGraphicCurve, Standard_True);
|
||||
}
|
||||
|
||||
return aGraphicCurve;
|
||||
@ -173,7 +173,7 @@ Handle(AIS_Point) OCCDemo_Presentation::drawPoint
|
||||
|
||||
getAISContext()->SetColor (aGraphicPoint, theColor, toDisplay);
|
||||
if (toDisplay) {
|
||||
getAISContext()->Display (aGraphicPoint);
|
||||
getAISContext()->Display (aGraphicPoint, Standard_True);
|
||||
//COCCDemoDoc::Fit();
|
||||
}
|
||||
|
||||
@ -211,7 +211,7 @@ Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawVector
|
||||
CTriangulationDoc::Fit();
|
||||
}
|
||||
else
|
||||
getAISContext()->Display (aGraphicCurve);
|
||||
getAISContext()->Display (aGraphicCurve, Standard_True);
|
||||
}
|
||||
|
||||
return aGraphicCurve;
|
||||
@ -232,7 +232,7 @@ Handle(AIS_Shape) OCCDemo_Presentation::drawShape
|
||||
CTriangulationDoc::Fit();
|
||||
}
|
||||
else
|
||||
getAISContext()->Display (aGraphicShape);
|
||||
getAISContext()->Display (aGraphicShape, Standard_True);
|
||||
}
|
||||
|
||||
return aGraphicShape;
|
||||
@ -252,7 +252,7 @@ Handle(AIS_Shape) OCCDemo_Presentation::drawShape
|
||||
CTriangulationDoc::Fit();
|
||||
}
|
||||
else
|
||||
getAISContext()->Display (aGraphicShape);
|
||||
getAISContext()->Display (aGraphicShape, Standard_True);
|
||||
}
|
||||
|
||||
return aGraphicShape;
|
||||
|
@ -66,7 +66,7 @@ void Tesselate_Presentation::DoSample()
|
||||
{
|
||||
((CTriangulationApp*) AfxGetApp())->SetSampleName (L"Tesselate");
|
||||
((CTriangulationApp*) AfxGetApp())->SetSamplePath (L"");
|
||||
getAISContext()->EraseAll();
|
||||
getAISContext()->EraseAll (Standard_True);
|
||||
if (myIndex >=0 && myIndex < myNbSamples)
|
||||
sample (myFileNames[myIndex]);
|
||||
}
|
||||
@ -269,11 +269,11 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape)
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
@ -368,7 +368,7 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape)
|
||||
if(aCount == aNumOfFace)
|
||||
{
|
||||
aShowFace = drawShape(aComp1,Quantity_NOC_GREEN);
|
||||
getAISContext()->Erase(aShowEdge);
|
||||
getAISContext()->Erase (aShowEdge, Standard_True);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -389,7 +389,7 @@ void Tesselate_Presentation::tesselateShape(const TopoDS_Shape& aShape)
|
||||
|
||||
if(WAIT_A_SECOND) return;
|
||||
drawShape(aCompound,Quantity_NOC_GREEN);
|
||||
getAISContext()->Erase(aShowFace);
|
||||
getAISContext()->Erase (aShowFace, Standard_True);
|
||||
|
||||
}
|
||||
|
||||
|
@ -75,7 +75,7 @@ void CTriangulationDoc::OnTriangu()
|
||||
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);
|
||||
@ -84,10 +84,10 @@ void CTriangulationDoc::OnTriangu()
|
||||
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);
|
||||
|
||||
@ -133,7 +133,7 @@ void CTriangulationDoc::OnVisu()
|
||||
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();
|
||||
@ -142,11 +142,11 @@ TopoDS_Shape ShapeFused = BRepAlgoAPI_Fuse(theSphere, theBox).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;
|
||||
@ -188,9 +188,9 @@ for (TopExp_Explorer ex(ShapeFused,TopAbs_FACE) ; ex.More(); ex.Next()) {
|
||||
}
|
||||
}
|
||||
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();
|
||||
|
||||
@ -258,7 +258,7 @@ void CTriangulationDoc::OnClear()
|
||||
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();
|
||||
@ -268,10 +268,10 @@ 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);
|
||||
|
||||
BRepTools::Clean(ShapeFused);
|
||||
|
||||
@ -360,14 +360,14 @@ void CTriangulationDoc::DoSample()
|
||||
|
||||
void CTriangulationDoc::OnBUTTONStart()
|
||||
{
|
||||
myAISContext->EraseAll();
|
||||
myAISContext->EraseAll (Standard_True);
|
||||
myPresentation->FirstSample();
|
||||
DoSample();
|
||||
}
|
||||
|
||||
void CTriangulationDoc::OnBUTTONEnd()
|
||||
{
|
||||
myAISContext->EraseAll();
|
||||
myAISContext->EraseAll (Standard_True);
|
||||
myPresentation->LastSample();
|
||||
DoSample();
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ void CHLRDoc::OnObjectErase()
|
||||
myAISContext->InitSelected();
|
||||
}
|
||||
|
||||
myAISContext->ClearSelected();
|
||||
myAISContext->ClearSelected (Standard_True);
|
||||
|
||||
if (toUpdateDisplayable)
|
||||
{
|
||||
|
@ -145,7 +145,7 @@ void CSelectionDialog::OnDisplay (bool isFit)
|
||||
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)
|
||||
@ -167,8 +167,8 @@ void CSelectionDialog::SetTitle (const CString & aTitle)
|
||||
void CSelectionDialog::UpdateViews()
|
||||
{
|
||||
// Clear HLR dialog view
|
||||
myInteractiveContext->RemoveAll();
|
||||
myInteractiveContext->Display (myTrihedron);
|
||||
myInteractiveContext->RemoveAll (Standard_False);
|
||||
myInteractiveContext->Display (myTrihedron, Standard_False);
|
||||
|
||||
UpdateProjector();
|
||||
|
||||
@ -182,10 +182,10 @@ void CSelectionDialog::UpdateViews()
|
||||
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
|
||||
@ -203,8 +203,8 @@ void CSelectionDialog::OnGetSelectedShapes()
|
||||
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();
|
||||
@ -219,10 +219,10 @@ void CSelectionDialog::OnGetSelectedShapes()
|
||||
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
|
||||
@ -236,7 +236,7 @@ void CSelectionDialog::OnGetSelectedShapes()
|
||||
void CSelectionDialog::Apply()
|
||||
{
|
||||
SetCursor(AfxGetApp()->LoadStandardCursor (IDC_WAIT));
|
||||
myDoc->GetInteractiveContext2D()->RemoveAll();
|
||||
myDoc->GetInteractiveContext2D()->RemoveAll (Standard_False);
|
||||
UpdateData (true);
|
||||
|
||||
Standard_Integer aDisplayMode = m_DisplayMode;
|
||||
|
@ -127,24 +127,24 @@ CAnimationDoc::CAnimationDoc()
|
||||
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);
|
||||
@ -204,7 +204,7 @@ void CAnimationDoc::DragEvent(const Standard_Integer x ,
|
||||
}
|
||||
|
||||
if (TheState == 1)
|
||||
myAISContext->Select(theButtonDownX,theButtonDownY,x,y,aView);
|
||||
myAISContext->Select (theButtonDownX, theButtonDownY, x, y, aView, Standard_True);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------
|
||||
@ -214,7 +214,7 @@ void CAnimationDoc::InputEvent(const Standard_Integer /*x*/,
|
||||
const Standard_Integer /*y*/,
|
||||
const Handle(V3d_View)& /*aView*/ )
|
||||
{
|
||||
myAISContext->Select();
|
||||
myAISContext->Select (Standard_True);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------
|
||||
@ -224,7 +224,7 @@ void CAnimationDoc::MoveEvent(const Standard_Integer x ,
|
||||
const Standard_Integer y ,
|
||||
const Handle(V3d_View)& aView )
|
||||
{
|
||||
myAISContext->MoveTo(x,y,aView);
|
||||
myAISContext->MoveTo (x, y, aView, Standard_True);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------
|
||||
@ -234,7 +234,7 @@ void CAnimationDoc::ShiftMoveEvent(const Standard_Integer x ,
|
||||
const Standard_Integer y ,
|
||||
const Handle(V3d_View)& aView )
|
||||
{
|
||||
myAISContext->MoveTo(x,y,aView);
|
||||
myAISContext->MoveTo (x, y, aView, Standard_True);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------
|
||||
@ -255,7 +255,7 @@ void CAnimationDoc::ShiftDragEvent(const Standard_Integer x ,
|
||||
}
|
||||
|
||||
if (TheState == 0)
|
||||
myAISContext->ShiftSelect(theButtonDownX,theButtonDownY,x,y,aView);
|
||||
myAISContext->ShiftSelect (theButtonDownX, theButtonDownY, x, y, aView, Standard_True);
|
||||
}
|
||||
|
||||
|
||||
@ -266,7 +266,7 @@ void CAnimationDoc::ShiftInputEvent(const Standard_Integer /*x*/,
|
||||
const Standard_Integer /*y*/,
|
||||
const Handle(V3d_View)& /*aView*/)
|
||||
{
|
||||
myAISContext->ShiftSelect();
|
||||
myAISContext->ShiftSelect (Standard_True);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------
|
||||
@ -333,7 +333,7 @@ void CAnimationDoc::OnShading()
|
||||
|
||||
myAisPropeller->Set(Propeller);
|
||||
myAISContext->Deactivate(myAisPropeller);
|
||||
myAISContext->Redisplay(myAisPropeller);
|
||||
myAISContext->Redisplay (myAisPropeller, Standard_True);
|
||||
}
|
||||
((CAnimationView3D *)pCurrentView)->OnRestart();
|
||||
}
|
||||
@ -401,7 +401,7 @@ void CAnimationDoc::OnFileLoadgrid()
|
||||
myFace = aMkFace.Face();
|
||||
|
||||
// Remove all other shapes
|
||||
myAISContext->RemoveAll();
|
||||
myAISContext->RemoveAll (Standard_False);
|
||||
|
||||
Handle(AIS_Shape) myAISSurface = new AIS_Shape(myFace);
|
||||
|
||||
|
@ -77,7 +77,7 @@ void Convert_Presentation::DoSample()
|
||||
{
|
||||
((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])();
|
||||
}
|
||||
@ -238,7 +238,7 @@ void Convert_Presentation::sampleBezier()
|
||||
//================================================================
|
||||
void Convert_Presentation::sampleBezierSurface()
|
||||
{
|
||||
getAISContext()->EraseAll();
|
||||
getAISContext()->EraseAll (Standard_True);
|
||||
|
||||
Standard_CString aName = "BezierSurface";
|
||||
// Create a BezierSurface
|
||||
@ -292,7 +292,7 @@ void Convert_Presentation::sampleBezierSurface()
|
||||
//================================================================
|
||||
void Convert_Presentation::sampleCylindricalSurface()
|
||||
{
|
||||
getAISContext()->EraseAll();
|
||||
getAISContext()->EraseAll (Standard_True);
|
||||
|
||||
Standard_CString aName = "Cylindrical Surface";
|
||||
TCollection_AsciiString aText (
|
||||
@ -332,7 +332,7 @@ void Convert_Presentation::sampleRevolSurface()
|
||||
TranslateView(-176.84682, -102.12892);
|
||||
SetViewScale(0.69326);
|
||||
|
||||
getAISContext()->EraseAll();
|
||||
getAISContext()->EraseAll (Standard_True);
|
||||
|
||||
Standard_CString aName = "Surface of revolution";
|
||||
TCollection_AsciiString aText (
|
||||
@ -384,7 +384,7 @@ void Convert_Presentation::sampleRevolSurface()
|
||||
//================================================================
|
||||
void Convert_Presentation::sampleToroidalSurface()
|
||||
{
|
||||
getAISContext()->EraseAll();
|
||||
getAISContext()->EraseAll (Standard_True);
|
||||
|
||||
Standard_CString aName = "Toroidal surface";
|
||||
TCollection_AsciiString aText (
|
||||
@ -407,7 +407,7 @@ void Convert_Presentation::sampleToroidalSurface()
|
||||
//================================================================
|
||||
void Convert_Presentation::sampleConicalSurface()
|
||||
{
|
||||
getAISContext()->EraseAll();
|
||||
getAISContext()->EraseAll (Standard_True);
|
||||
|
||||
Standard_CString aName = "Conical surface";
|
||||
TCollection_AsciiString aText (
|
||||
@ -440,7 +440,7 @@ void Convert_Presentation::sampleConicalSurface()
|
||||
//================================================================
|
||||
void Convert_Presentation::sampleSphericalSurface()
|
||||
{
|
||||
getAISContext()->EraseAll();
|
||||
getAISContext()->EraseAll (Standard_True);
|
||||
|
||||
Standard_CString aName = "Spherical surface";
|
||||
TCollection_AsciiString aText (
|
||||
|
@ -102,7 +102,7 @@ Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawSurface
|
||||
COCCDemoDoc::Fit();
|
||||
}
|
||||
else
|
||||
getAISContext()->Display (aGraphicSurface);
|
||||
getAISContext()->Display (aGraphicSurface, Standard_True);
|
||||
}
|
||||
|
||||
return aGraphicSurface;
|
||||
@ -127,7 +127,7 @@ Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawCurve
|
||||
COCCDemoDoc::Fit();
|
||||
}
|
||||
else
|
||||
getAISContext()->Display (aGraphicCurve);
|
||||
getAISContext()->Display (aGraphicCurve, Standard_True);
|
||||
}
|
||||
|
||||
return aGraphicCurve;
|
||||
@ -174,7 +174,7 @@ Handle(AIS_Point) OCCDemo_Presentation::drawPoint
|
||||
|
||||
getAISContext()->SetColor (aGraphicPoint, theColor, toDisplay);
|
||||
if (toDisplay) {
|
||||
getAISContext()->Display (aGraphicPoint);
|
||||
getAISContext()->Display (aGraphicPoint, Standard_True);
|
||||
//COCCDemoDoc::Fit();
|
||||
}
|
||||
|
||||
@ -212,7 +212,7 @@ Handle(AIS_InteractiveObject) OCCDemo_Presentation::drawVector
|
||||
COCCDemoDoc::Fit();
|
||||
}
|
||||
else
|
||||
getAISContext()->Display (aGraphicCurve);
|
||||
getAISContext()->Display (aGraphicCurve, Standard_True);
|
||||
}
|
||||
|
||||
return aGraphicCurve;
|
||||
@ -233,7 +233,7 @@ Handle(AIS_Shape) OCCDemo_Presentation::drawShape
|
||||
COCCDemoDoc::Fit();
|
||||
}
|
||||
else
|
||||
getAISContext()->Display (aGraphicShape);
|
||||
getAISContext()->Display (aGraphicShape, Standard_True);
|
||||
}
|
||||
|
||||
return aGraphicShape;
|
||||
@ -253,7 +253,7 @@ Handle(AIS_Shape) OCCDemo_Presentation::drawShape
|
||||
COCCDemoDoc::Fit();
|
||||
}
|
||||
else
|
||||
getAISContext()->Display (aGraphicShape);
|
||||
getAISContext()->Display (aGraphicShape, Standard_True);
|
||||
}
|
||||
|
||||
return aGraphicShape;
|
||||
|
@ -73,8 +73,8 @@ BOOL COCCDemoDoc::OnNewDocument()
|
||||
// (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)
|
||||
@ -163,14 +163,14 @@ void COCCDemoDoc::DoSample()
|
||||
|
||||
void COCCDemoDoc::OnBUTTONStart()
|
||||
{
|
||||
myAISContext->EraseAll();
|
||||
myAISContext->EraseAll (Standard_True);
|
||||
myPresentation->FirstSample();
|
||||
DoSample();
|
||||
}
|
||||
|
||||
void COCCDemoDoc::OnBUTTONEnd()
|
||||
{
|
||||
myAISContext->EraseAll();
|
||||
myAISContext->EraseAll (Standard_True);
|
||||
myPresentation->LastSample();
|
||||
DoSample();
|
||||
}
|
||||
|
@ -494,18 +494,18 @@ void COCCDemoView::RedrawVisMode()
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
@ -313,10 +313,11 @@ void CDialogMaterial::SetMaterial(Graphic3d_NameOfMaterial Material)
|
||||
{
|
||||
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 ) ; }
|
||||
@ -375,11 +376,11 @@ CDialogTransparency::CDialogTransparency(Handle(AIS_InteractiveContext) CurrentI
|
||||
for (myCurrentIC->InitSelected();
|
||||
myCurrentIC->MoreSelected ();
|
||||
myCurrentIC->NextSelected ())
|
||||
{
|
||||
myCurrentIC->SetTransparency (myCurrentIC->SelectedInteractive(), temp);
|
||||
}
|
||||
|
||||
{
|
||||
myCurrentIC->SetTransparency (myCurrentIC->SelectedInteractive(), temp, Standard_False);
|
||||
}
|
||||
|
||||
myCurrentIC->UpdateCurrentViewer();
|
||||
}
|
||||
|
||||
|
||||
@ -417,10 +418,10 @@ void CDialogTransparency::OnDeltaposSpinaistransp(NMHDR* pNMHDR, LRESULT* pResul
|
||||
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;
|
||||
|
||||
}
|
||||
@ -434,9 +435,10 @@ void CDialogTransparency::OnChangeEditaistransp()
|
||||
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;
|
||||
|
@ -77,7 +77,7 @@ void CAngleParamsVerticesPage::OnBnClickedVertex1Btn()
|
||||
}
|
||||
|
||||
myFirstVertex = TopoDS::Vertex (myAISContext->SelectedShape());
|
||||
myAISContext->ClearSelected();
|
||||
myAISContext->ClearSelected (Standard_True);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -97,7 +97,7 @@ void CAngleParamsVerticesPage::OnBnClickedVertex2Btn()
|
||||
|
||||
mySecondVertex = TopoDS::Vertex (myAISContext->SelectedShape());
|
||||
|
||||
myAISContext->ClearSelected();
|
||||
myAISContext->ClearSelected (Standard_True);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -115,7 +115,7 @@ void CAngleParamsVerticesPage::OnBnClickedVertex3Btn()
|
||||
}
|
||||
|
||||
myThirdVertex = TopoDS::Vertex (myAISContext->SelectedShape());
|
||||
myAISContext->ClearSelected();
|
||||
myAISContext->ClearSelected (Standard_False);
|
||||
|
||||
//Build dimension here
|
||||
TopoDS_Edge anEdge12 = BRepBuilderAPI_MakeEdge (myFirstVertex, mySecondVertex);
|
||||
@ -151,6 +151,6 @@ void CAngleParamsVerticesPage::OnBnClickedVertex3Btn()
|
||||
}
|
||||
}
|
||||
anAngleDim->SetDimensionAspect (anAspect);
|
||||
myAISContext->Display (anAngleDim);
|
||||
myAISContext->Display (anAngleDim, Standard_True);
|
||||
myAISContext->Activate (AIS_Shape::SelectionMode (TopAbs_VERTEX));
|
||||
}
|
||||
|
@ -251,8 +251,8 @@ void CImportExport::ReadIGES(const Handle(AIS_InteractiveContext)& anInteractive
|
||||
{
|
||||
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 !!
|
||||
|
@ -79,7 +79,7 @@ void CLengthParamsEdgePage::OnBnClickedChooseEdgeBtn()
|
||||
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);
|
||||
|
||||
@ -108,6 +108,6 @@ void CLengthParamsEdgePage::OnBnClickedChooseEdgeBtn()
|
||||
aLenDim->SetDimensionAspect (anAspect);
|
||||
aLenDim->SetFlyout (aDimDlg->GetFlyout());
|
||||
|
||||
myAISContext->Display (aLenDim);
|
||||
myAISContext->Display (aLenDim, Standard_True);
|
||||
myAISContext->Activate (AIS_Shape::SelectionMode (TopAbs_EDGE));
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ void CLengthParamsEdgesPage::OnBnClickedEdge1Btn()
|
||||
|
||||
myFirstEdge = TopoDS::Edge (myAISContext->SelectedShape());
|
||||
|
||||
myAISContext->ClearSelected();
|
||||
myAISContext->ClearSelected (Standard_True);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -94,7 +94,7 @@ void CLengthParamsEdgesPage::OnBnClickedEdge2Btn()
|
||||
|
||||
mySecondEdge = TopoDS::Edge (myAISContext->SelectedShape());
|
||||
|
||||
myAISContext->ClearSelected();
|
||||
myAISContext->ClearSelected (Standard_True);
|
||||
|
||||
// Build plane through three points
|
||||
BRepAdaptor_Curve aCurve1 (myFirstEdge);
|
||||
@ -137,7 +137,7 @@ void CLengthParamsEdgesPage::OnBnClickedEdge2Btn()
|
||||
}
|
||||
|
||||
anAngleDim->SetFlyout (aDimDlg->GetFlyout());
|
||||
myAISContext->Display (anAngleDim);
|
||||
myAISContext->Display (anAngleDim, Standard_True);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -149,7 +149,7 @@ void CLengthParamsEdgesPage::OnBnClickedEdge2Btn()
|
||||
aLenDim->SetDisplayUnits (aDimDlg->GetUnits());
|
||||
}
|
||||
|
||||
myAISContext->Display (aLenDim);
|
||||
myAISContext->Display (aLenDim, Standard_True);
|
||||
}
|
||||
|
||||
myAISContext->Activate (AIS_Shape::SelectionMode (TopAbs_EDGE));
|
||||
|
@ -73,7 +73,7 @@ void CLengthParamsVerticesPage::OnBnClickedVertex1Btn()
|
||||
|
||||
myFirstVertex = TopoDS::Vertex (myAISContext->SelectedShape());
|
||||
|
||||
myAISContext->ClearSelected();
|
||||
myAISContext->ClearSelected (Standard_True);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -92,7 +92,7 @@ void CLengthParamsVerticesPage::OnBnClickedVertex2Btn()
|
||||
}
|
||||
|
||||
mySecondVertex = TopoDS::Vertex (myAISContext->SelectedShape());
|
||||
myAISContext->ClearSelected();
|
||||
myAISContext->ClearSelected (Standard_False);
|
||||
|
||||
//Build dimension here
|
||||
gp_Pnt aP1=BRep_Tool::Pnt (myFirstVertex);
|
||||
@ -120,7 +120,7 @@ void CLengthParamsVerticesPage::OnBnClickedVertex2Btn()
|
||||
aLenDim->SetDimensionAspect (anAspect);
|
||||
aLenDim->SetFlyout (aDimDlg->GetFlyout());
|
||||
|
||||
myAISContext->Display (aLenDim);
|
||||
myAISContext->Display (aLenDim, Standard_True);
|
||||
myAISContext->Activate (AIS_Shape::SelectionMode (TopAbs_VERTEX));
|
||||
}
|
||||
|
||||
|
@ -60,12 +60,12 @@ void OCC_2dDoc::MoveEvent(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);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
@ -579,8 +579,8 @@ void OCC_2dView::DragEvent2D(const Standard_Integer x,
|
||||
|
||||
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)
|
||||
@ -612,7 +612,7 @@ void OCC_2dView::MoveEvent2D(const Standard_Integer x,
|
||||
//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);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------
|
||||
@ -622,7 +622,7 @@ void OCC_2dView::MultiMoveEvent2D(const Standard_Integer x,
|
||||
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);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------
|
||||
@ -643,8 +643,8 @@ void OCC_2dView::MultiDragEvent2D(const Standard_Integer x ,
|
||||
|
||||
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)
|
||||
|
@ -114,7 +114,7 @@ void OCC_3dBaseDoc::DragEvent (const Standard_Integer theMouseX,
|
||||
{
|
||||
myAISContext->Select (aStartDragX, aStartDragY,
|
||||
theMouseX, theMouseY,
|
||||
theView);
|
||||
theView, Standard_True);
|
||||
break;
|
||||
}
|
||||
};
|
||||
@ -127,8 +127,8 @@ void OCC_3dBaseDoc::InputEvent (const Standard_Integer theMouseX,
|
||||
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);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------
|
||||
@ -138,7 +138,7 @@ void OCC_3dBaseDoc::MoveEvent (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);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------
|
||||
@ -148,7 +148,7 @@ void OCC_3dBaseDoc::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);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------
|
||||
@ -178,7 +178,7 @@ void OCC_3dBaseDoc::ShiftDragEvent (const Standard_Integer theMouseX,
|
||||
// button up
|
||||
myAISContext->ShiftSelect (aStartDragX, aStartDragY,
|
||||
theMouseX, theMouseY,
|
||||
theView);
|
||||
theView, Standard_True);
|
||||
}
|
||||
}
|
||||
|
||||
@ -189,7 +189,7 @@ void OCC_3dBaseDoc::ShiftInputEvent (const Standard_Integer /*theMouseX*/,
|
||||
const Standard_Integer /*theMouseY*/,
|
||||
const Handle(V3d_View)& /*theView*/)
|
||||
{
|
||||
myAISContext->ShiftSelect();
|
||||
myAISContext->ShiftSelect (Standard_True);
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------------------
|
||||
@ -278,7 +278,8 @@ void OCC_3dBaseDoc::OnObjectColor()
|
||||
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)
|
||||
@ -293,8 +294,8 @@ 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)
|
||||
{
|
||||
@ -310,7 +311,8 @@ 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)
|
||||
{
|
||||
@ -323,7 +325,8 @@ 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)
|
||||
@ -358,10 +361,11 @@ BOOL OCC_3dBaseDoc::OnObjectMaterialRange(UINT nID)
|
||||
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;
|
||||
|
||||
}
|
||||
@ -399,7 +403,7 @@ void OCC_3dBaseDoc::OnUpdateObjectTransparency(CCmdUI* pCmdUI)
|
||||
|
||||
void OCC_3dBaseDoc::OnObjectDisplayall()
|
||||
{
|
||||
myAISContext->DisplayAll();
|
||||
myAISContext->DisplayAll (Standard_True);
|
||||
}
|
||||
|
||||
void OCC_3dBaseDoc::OnUpdateObjectDisplayall(CCmdUI* pCmdUI)
|
||||
@ -435,7 +439,8 @@ void OCC_3dBaseDoc::SetMaterial(Graphic3d_NameOfMaterial Material)
|
||||
{
|
||||
for (myAISContext->InitSelected();myAISContext->MoreSelected ();myAISContext->NextSelected ())
|
||||
myAISContext->SetMaterial (myAISContext->SelectedInteractive(),
|
||||
(Graphic3d_NameOfMaterial)(Material));
|
||||
(Graphic3d_NameOfMaterial)(Material), Standard_False);
|
||||
myAISContext->UpdateCurrentViewer();
|
||||
}
|
||||
|
||||
|
||||
|
@ -53,7 +53,7 @@ void CParamsFacesPage::OnBnClickedFacesbtn1()
|
||||
|
||||
myFirstFace = TopoDS::Face (myAISContext->SelectedShape());
|
||||
|
||||
myAISContext->ClearSelected();
|
||||
myAISContext->ClearSelected (Standard_True);
|
||||
}
|
||||
|
||||
void CParamsFacesPage::OnBnClickedFacesbtn2()
|
||||
@ -71,7 +71,7 @@ void CParamsFacesPage::OnBnClickedFacesbtn2()
|
||||
}
|
||||
|
||||
mySecondFace = TopoDS::Face (myAISContext->SelectedShape());
|
||||
myAISContext->ClearSelected();
|
||||
myAISContext->ClearSelected (Standard_False);
|
||||
|
||||
CDimensionDlg *aDimDlg = (CDimensionDlg*)(GetParentOwner());
|
||||
|
||||
@ -104,7 +104,7 @@ void CParamsFacesPage::OnBnClickedFacesbtn2()
|
||||
}
|
||||
|
||||
anAngleDim->SetFlyout (aDimDlg->GetFlyout());
|
||||
myAISContext->Display (anAngleDim);
|
||||
myAISContext->Display (anAngleDim, Standard_True);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -117,7 +117,7 @@ void CParamsFacesPage::OnBnClickedFacesbtn2()
|
||||
aLenDim->SetDisplayUnits (aDimDlg->GetUnits());
|
||||
}
|
||||
|
||||
myAISContext->Display (aLenDim);
|
||||
myAISContext->Display (aLenDim, Standard_True);
|
||||
}
|
||||
|
||||
myAISContext->Activate (aSelectionMode);
|
||||
|
@ -94,7 +94,7 @@ void CRadiusParamsPage::OnBnClickedObjectBtn()
|
||||
}
|
||||
}
|
||||
|
||||
myAISContext->ClearSelected();
|
||||
myAISContext->ClearSelected (Standard_False);
|
||||
CDimensionDlg *aDimDlg = (CDimensionDlg*)(this->GetParentOwner());
|
||||
// Try to create dimension if it is possible
|
||||
Handle(AIS_Dimension) aDim;
|
||||
@ -125,6 +125,6 @@ void CRadiusParamsPage::OnBnClickedObjectBtn()
|
||||
|
||||
// Display dimension in the neutral point
|
||||
|
||||
myAISContext->Display (aDim);
|
||||
myAISContext->Display (aDim, Standard_True);
|
||||
myAISContext->Activate (AIS_Shape::SelectionMode (TopAbs_EDGE));
|
||||
}
|
||||
|
@ -196,14 +196,16 @@ void DocumentCommon::onColor()
|
||||
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()
|
||||
@ -216,7 +218,8 @@ 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()
|
||||
@ -229,7 +232,7 @@ void DocumentCommon::onTransparency()
|
||||
void DocumentCommon::onDelete()
|
||||
{
|
||||
myContext->EraseSelected (Standard_False);
|
||||
myContext->ClearSelected();
|
||||
myContext->ClearSelected (Standard_False);
|
||||
myContext->UpdateCurrentViewer();
|
||||
getApplication()->onSelectionChanged();
|
||||
}
|
||||
|
@ -820,25 +820,25 @@ void View::DragEvent( const int x, const int y, const int TheState )
|
||||
|
||||
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 )
|
||||
@ -853,14 +853,14 @@ 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();
|
||||
}
|
||||
|
||||
|
@ -24,8 +24,8 @@ void DocumentTut::onMakeBottle()
|
||||
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);
|
||||
|
@ -2176,7 +2176,6 @@ void AIS_InteractiveContext::UnsetTransparency (const Handle(AIS_InteractiveObje
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void AIS_InteractiveContext::SetSelectedAspect (const Handle(Prs3d_BasicAspect)& theAspect,
|
||||
const Standard_Boolean ,
|
||||
const Standard_Boolean theToUpdateViewer)
|
||||
{
|
||||
if (HasOpenedContext())
|
||||
@ -2754,10 +2753,10 @@ void AIS_InteractiveContext::SetTrihedronSize (const Standard_Real theVal,
|
||||
//=======================================================================
|
||||
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);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
@ -2858,6 +2857,15 @@ void AIS_InteractiveContext::Disconnect (const Handle(AIS_InteractiveObject)& th
|
||||
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
|
||||
|
@ -158,7 +158,8 @@ public:
|
||||
//! 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
|
||||
@ -183,7 +184,12 @@ public:
|
||||
//! - 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
|
||||
@ -201,21 +207,22 @@ public:
|
||||
//! 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.
|
||||
@ -226,7 +233,7 @@ public:
|
||||
//! 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
|
||||
@ -249,7 +256,9 @@ public:
|
||||
//! 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.
|
||||
@ -257,11 +266,12 @@ public:
|
||||
//! 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
|
||||
@ -273,7 +283,8 @@ public:
|
||||
//! 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);
|
||||
}
|
||||
@ -286,8 +297,8 @@ public:
|
||||
//! 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.
|
||||
@ -295,7 +306,8 @@ public:
|
||||
//! 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.
|
||||
@ -316,16 +328,22 @@ public:
|
||||
//! 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
|
||||
@ -336,7 +354,8 @@ public:
|
||||
//! 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.
|
||||
@ -349,7 +368,9 @@ public:
|
||||
//! 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.
|
||||
@ -360,7 +381,8 @@ public:
|
||||
//! 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
|
||||
@ -404,7 +426,9 @@ public:
|
||||
//! 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.
|
||||
@ -412,14 +436,17 @@ public:
|
||||
//! 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.
|
||||
@ -427,7 +454,9 @@ public:
|
||||
//! 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.
|
||||
@ -435,7 +464,8 @@ public:
|
||||
//! 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
|
||||
@ -446,7 +476,9 @@ public:
|
||||
//! 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
|
||||
@ -455,7 +487,8 @@ public:
|
||||
//! 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
|
||||
@ -464,7 +497,9 @@ public:
|
||||
//! 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
|
||||
@ -474,7 +509,8 @@ public:
|
||||
//! 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
|
||||
@ -486,7 +522,9 @@ public:
|
||||
//! 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
|
||||
@ -496,11 +534,16 @@ public:
|
||||
//! 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;
|
||||
@ -519,7 +562,8 @@ public:
|
||||
//! 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;
|
||||
@ -531,7 +575,9 @@ public:
|
||||
//! 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.
|
||||
@ -540,7 +586,8 @@ public:
|
||||
//! 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.
|
||||
@ -691,7 +738,8 @@ public:
|
||||
//! 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.
|
||||
@ -712,27 +760,39 @@ public:
|
||||
//! 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
|
||||
@ -872,13 +932,17 @@ public:
|
||||
//! 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
|
||||
@ -913,28 +977,42 @@ public:
|
||||
//! 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
|
||||
@ -956,7 +1034,8 @@ public:
|
||||
//! 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
|
||||
@ -965,7 +1044,7 @@ public:
|
||||
//! 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.
|
||||
@ -1028,7 +1107,7 @@ public:
|
||||
//! 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
|
||||
@ -1039,7 +1118,7 @@ public:
|
||||
//! 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
|
||||
@ -1052,7 +1131,7 @@ public:
|
||||
//! 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.
|
||||
@ -1069,7 +1148,7 @@ public:
|
||||
//! 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.
|
||||
@ -1079,29 +1158,29 @@ public:
|
||||
//! 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
|
||||
@ -1110,17 +1189,18 @@ public:
|
||||
//! 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;
|
||||
@ -1280,7 +1360,8 @@ public:
|
||||
//! 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")
|
||||
@ -1294,12 +1375,12 @@ public:
|
||||
//! 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")
|
||||
@ -1387,7 +1468,9 @@ public:
|
||||
//! 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
|
||||
@ -1398,7 +1481,8 @@ public:
|
||||
//! 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.
|
||||
@ -1406,16 +1490,17 @@ public:
|
||||
//! 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.
|
||||
@ -1562,7 +1647,13 @@ public:
|
||||
//! 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);
|
||||
|
||||
@ -1591,21 +1682,27 @@ protected:
|
||||
|
||||
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);
|
||||
|
@ -754,7 +754,7 @@ void AIS_InteractiveContext::AddOrRemoveCurrentObject (const Handle(AIS_Interact
|
||||
//=======================================================================
|
||||
void AIS_InteractiveContext::UpdateCurrent()
|
||||
{
|
||||
UpdateSelected();
|
||||
UpdateSelected (Standard_True);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@ -468,7 +468,7 @@ Standard_Boolean AIS_LocalContext::Remove(const Handle(AIS_InteractiveObject)& a
|
||||
// If subintensity used
|
||||
else if (Att->IsSubIntensityOn())
|
||||
{
|
||||
myCTX->SubIntensityOff (aSelectable);
|
||||
myCTX->SubIntensityOff (aSelectable, Standard_False);
|
||||
}
|
||||
|
||||
// Deactivate stored selection modes
|
||||
@ -1001,7 +1001,7 @@ void AIS_LocalContext::ClearObjects()
|
||||
else {
|
||||
if (CurAtt->IsSubIntensityOn())
|
||||
{
|
||||
myCTX->SubIntensityOff(SO);
|
||||
myCTX->SubIntensityOff(SO, Standard_False);
|
||||
}
|
||||
Standard_Integer DiMo = SO->HasDisplayMode()?
|
||||
SO->DisplayMode():myCTX->DisplayMode();
|
||||
|
@ -305,7 +305,6 @@ void AIS_Manipulator::Attach (const Handle(AIS_ManipulatorObjectSequence)& theOb
|
||||
}
|
||||
|
||||
aContext->Load (this);
|
||||
aContext->CurrentViewer()->RedrawImmediate();
|
||||
}
|
||||
|
||||
if (theOptions.EnableModes)
|
||||
|
@ -656,7 +656,7 @@ void AIS_Trihedron::SetContext(const Handle(AIS_InteractiveContext)& Ctx)
|
||||
if (hasContext)
|
||||
{
|
||||
if (anAISContext->IsSelected (myShapes[anIdx]))
|
||||
anAISContext->AddOrRemoveSelected (myShapes[anIdx]);
|
||||
anAISContext->AddOrRemoveSelected (myShapes[anIdx], Standard_False);
|
||||
|
||||
anAISContext->Remove (myShapes[anIdx], Standard_False);
|
||||
}
|
||||
|
@ -371,7 +371,7 @@ static Standard_Integer OCC10bug (Draw_Interpretor& di, Standard_Integer argc, c
|
||||
theAISPlaneTri->SetLength(Length);
|
||||
|
||||
GetMapOfAIS().Bind ( theAISPlaneTri, name);
|
||||
aContext->Display(theAISPlaneTri );
|
||||
aContext->Display (theAISPlaneTri, Standard_True);
|
||||
}
|
||||
|
||||
Standard_Real getLength = theAISPlaneTri->GetLength();
|
||||
|
@ -122,7 +122,7 @@ static Standard_Integer OCC128 (Draw_Interpretor& di, Standard_Integer /*argc*/
|
||||
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));
|
||||
@ -215,33 +215,35 @@ static Standard_Integer OCC136 (Draw_Interpretor& di, Standard_Integer argc, con
|
||||
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;
|
||||
}
|
||||
|
||||
@ -639,7 +641,7 @@ static Standard_Integer OCC297 (Draw_Interpretor& di,Standard_Integer /*argc*/,
|
||||
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();
|
||||
@ -4564,10 +4566,10 @@ static Standard_Integer OCC12584 (Draw_Interpretor& di, Standard_Integer argc, c
|
||||
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();
|
||||
}
|
||||
|
@ -614,8 +614,7 @@ static Standard_Integer BUC60920(Draw_Interpretor& di, Standard_Integer /*argc*
|
||||
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;
|
||||
|
@ -46,14 +46,14 @@ static Standard_Integer BUC60720 (Draw_Interpretor& di,Standard_Integer argc,con
|
||||
{
|
||||
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";
|
||||
|
@ -145,7 +145,7 @@ static Standard_Integer BUC60814(Draw_Interpretor& di, Standard_Integer argc, c
|
||||
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);
|
||||
@ -154,13 +154,13 @@ static Standard_Integer BUC60814(Draw_Interpretor& di, Standard_Integer argc, c
|
||||
|
||||
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;
|
||||
}
|
||||
@ -197,7 +197,7 @@ static Standard_Integer BUC60774 (Draw_Interpretor& theDi,
|
||||
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 ");
|
||||
@ -206,7 +206,7 @@ static Standard_Integer BUC60774 (Draw_Interpretor& theDi,
|
||||
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 ");
|
||||
@ -215,7 +215,7 @@ static Standard_Integer BUC60774 (Draw_Interpretor& theDi,
|
||||
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 ");
|
||||
@ -251,7 +251,7 @@ static Standard_Integer BUC60972 (Draw_Interpretor& di, Standard_Integer argc, c
|
||||
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;
|
||||
}
|
||||
@ -338,7 +338,7 @@ static Standard_Integer OCC218bug (Draw_Interpretor& di, Standard_Integer argc,
|
||||
theAISPlaneTri->SetYLabel(Ylabel);
|
||||
|
||||
GetMapOfAIS().Bind ( theAISPlaneTri, name);
|
||||
aContext->Display(theAISPlaneTri );
|
||||
aContext->Display (theAISPlaneTri, Standard_True);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -692,8 +692,8 @@ static Standard_Integer OCC301 (Draw_Interpretor& di, Standard_Integer argc, con
|
||||
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);
|
||||
@ -788,7 +788,7 @@ static Standard_Integer OCC70 (Draw_Interpretor& di, Standard_Integer argc, cons
|
||||
|
||||
Handle(V3d_View) V3dView = ViewerTest::CurrentView();
|
||||
|
||||
aContext->Select(Polyline,V3dView);
|
||||
aContext->Select (Polyline, V3dView, Standard_False);
|
||||
aContext->UpdateCurrentViewer();
|
||||
|
||||
return 0;
|
||||
|
@ -94,7 +94,7 @@ static Standard_Integer BUC60842 (Draw_Interpretor& di, Standard_Integer /*argc*
|
||||
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);
|
||||
@ -103,7 +103,7 @@ static Standard_Integer BUC60842 (Draw_Interpretor& di, Standard_Integer /*argc*
|
||||
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);
|
||||
@ -117,9 +117,11 @@ static Standard_Integer BUC60842 (Draw_Interpretor& di, Standard_Integer /*argc*
|
||||
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;
|
||||
}
|
||||
@ -210,7 +212,7 @@ static Standard_Integer BUC60970 (Draw_Interpretor& di, Standard_Integer argc, c
|
||||
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);
|
||||
|
||||
@ -226,7 +228,7 @@ static Standard_Integer BUC60970 (Draw_Interpretor& di, Standard_Integer argc, c
|
||||
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);
|
||||
|
||||
@ -234,7 +236,7 @@ static Standard_Integer BUC60970 (Draw_Interpretor& di, Standard_Integer argc, c
|
||||
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());
|
||||
|
||||
@ -260,7 +262,7 @@ static Standard_Integer BUC60818(Draw_Interpretor& di, Standard_Integer argc, c
|
||||
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();
|
||||
@ -276,8 +278,8 @@ static Standard_Integer BUC60818(Draw_Interpretor& di, Standard_Integer argc, c
|
||||
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";
|
||||
@ -335,7 +337,7 @@ static Standard_Integer BUC60915_1(Draw_Interpretor& di, Standard_Integer argc,
|
||||
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"
|
||||
/***************************************/
|
||||
@ -343,13 +345,13 @@ static Standard_Integer BUC60915_1(Draw_Interpretor& di, Standard_Integer argc,
|
||||
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"
|
||||
/***************************************/
|
||||
@ -357,7 +359,7 @@ static Standard_Integer BUC60915_1(Draw_Interpretor& di, Standard_Integer argc,
|
||||
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"
|
||||
/***************************************/
|
||||
@ -366,7 +368,7 @@ static Standard_Integer BUC60915_1(Draw_Interpretor& di, Standard_Integer argc,
|
||||
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"
|
||||
/***************************************/
|
||||
@ -375,7 +377,7 @@ static Standard_Integer BUC60915_1(Draw_Interpretor& di, Standard_Integer argc,
|
||||
dim1 = new AIS_RadiusDimension(E_cir2);
|
||||
anAspect->ArrowAspect()->SetLength (40.0);
|
||||
dim1->SetDimensionAspect (anAspect);
|
||||
context->Display(dim1);
|
||||
context->Display (dim1, Standard_True);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -396,13 +398,13 @@ static Standard_Integer OCC138 (Draw_Interpretor& di, Standard_Integer /*argc*/
|
||||
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();
|
||||
|
||||
@ -413,10 +415,12 @@ static Standard_Integer OCC138 (Draw_Interpretor& di, Standard_Integer /*argc*/
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
@ -576,7 +580,7 @@ static Standard_Integer OCC232 (Draw_Interpretor& di, Standard_Integer /*argc*/
|
||||
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())
|
||||
@ -589,10 +593,13 @@ static Standard_Integer OCC232 (Draw_Interpretor& di, Standard_Integer /*argc*/
|
||||
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;
|
||||
}
|
||||
|
||||
@ -612,13 +619,13 @@ static Standard_Integer OCC138LC (Draw_Interpretor& di, Standard_Integer /*argc
|
||||
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();
|
||||
|
||||
@ -629,10 +636,12 @@ static Standard_Integer OCC138LC (Draw_Interpretor& di, Standard_Integer /*argc
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
@ -934,7 +943,7 @@ static Standard_Integer OCC813 (Draw_Interpretor& di, Standard_Integer argc,cons
|
||||
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.
|
||||
@ -951,10 +960,16 @@ static Standard_Integer OCC813 (Draw_Interpretor& di, Standard_Integer argc,cons
|
||||
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;
|
||||
}
|
||||
|
||||
@ -995,12 +1010,12 @@ static Standard_Integer OCC814 (Draw_Interpretor& di, Standard_Integer argc,cons
|
||||
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);
|
||||
@ -1022,10 +1037,16 @@ static Standard_Integer OCC814 (Draw_Interpretor& di, Standard_Integer argc,cons
|
||||
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;
|
||||
}
|
||||
|
||||
@ -1254,7 +1275,7 @@ static Standard_Integer OCC1174_1 (Draw_Interpretor& di, Standard_Integer argc,
|
||||
|
||||
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);
|
||||
@ -1287,8 +1308,8 @@ static Standard_Integer OCC1174_2 (Draw_Interpretor& di, Standard_Integer argc,
|
||||
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);
|
||||
@ -1310,7 +1331,7 @@ static Standard_Integer OCC1174_2 (Draw_Interpretor& di, Standard_Integer argc,
|
||||
back.SetTransparency(0.2);
|
||||
sa->SetMaterial(back,Aspect_TOFM_BACK_SIDE);
|
||||
|
||||
AISContext->Redisplay(ais,1,0);
|
||||
AISContext->Redisplay (ais, 1, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -1471,7 +1492,7 @@ static Standard_Integer OCC2569 (Draw_Interpretor& di, Standard_Integer argc, co
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
@ -1285,8 +1285,8 @@ static Standard_Integer OCC24012 (Draw_Interpretor& di, Standard_Integer argc, c
|
||||
{
|
||||
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;
|
||||
@ -1845,7 +1845,7 @@ static Standard_Integer OCC24622 (Draw_Interpretor& /*theDi*/, Standard_Integer
|
||||
|
||||
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;
|
||||
}
|
||||
@ -3304,7 +3304,7 @@ static Standard_Integer OCC26172 (Draw_Interpretor& theDI, Standard_Integer theA
|
||||
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;
|
||||
@ -3398,16 +3398,17 @@ static Standard_Integer OCC26284 (Draw_Interpretor& theDI, Standard_Integer theA
|
||||
|
||||
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;
|
||||
}
|
||||
@ -4170,16 +4171,16 @@ static Standard_Integer OCC26462 (Draw_Interpretor& theDI, Standard_Integer /*th
|
||||
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";
|
||||
@ -4188,15 +4189,15 @@ static Standard_Integer OCC26462 (Draw_Interpretor& theDI, Standard_Integer /*th
|
||||
|
||||
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";
|
||||
@ -4885,8 +4886,8 @@ static Standard_Integer BUC26658 (Draw_Interpretor& theDI,
|
||||
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();
|
||||
@ -4912,7 +4913,7 @@ static Standard_Integer BUC26658 (Draw_Interpretor& theDI,
|
||||
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();
|
||||
@ -5149,7 +5150,7 @@ static Standard_Integer OCC27523 (Draw_Interpretor& theDI, Standard_Integer theA
|
||||
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;
|
||||
@ -5171,7 +5172,7 @@ static Standard_Integer OCC27523 (Draw_Interpretor& theDI, Standard_Integer theA
|
||||
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())
|
||||
@ -5252,7 +5253,7 @@ static Standard_Integer OCC27700 (Draw_Interpretor& /*theDI*/, Standard_Integer
|
||||
return 1;
|
||||
}
|
||||
Handle(OCC27700_Text) aPresentation = new OCC27700_Text();
|
||||
aContext->Display (aPresentation);
|
||||
aContext->Display (aPresentation, Standard_True);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -244,7 +244,7 @@ static Standard_Integer BUC60632(Draw_Interpretor& di, Standard_Integer /*n*/, c
|
||||
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));
|
||||
@ -252,8 +252,8 @@ static Standard_Integer BUC60632(Draw_Interpretor& di, Standard_Integer /*n*/, c
|
||||
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");
|
||||
@ -268,8 +268,8 @@ static Standard_Integer BUC60632(Draw_Interpretor& di, Standard_Integer /*n*/, c
|
||||
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;
|
||||
}
|
||||
|
||||
@ -553,8 +553,8 @@ static Standard_Integer BUC60792(Draw_Interpretor& di, Standard_Integer /*argc*/
|
||||
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);
|
||||
@ -575,10 +575,10 @@ static Standard_Integer BUC60792(Draw_Interpretor& di, Standard_Integer /*argc*/
|
||||
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);
|
||||
@ -587,6 +587,7 @@ static Standard_Integer BUC60792(Draw_Interpretor& di, Standard_Integer /*argc*/
|
||||
printf("%f\t%f\t\t%f\t%f\n",ParSol2, ParArg2,PntSol2.X(),PntSol2.Y());
|
||||
}
|
||||
}
|
||||
aContext->UpdateCurrentViewer();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -646,7 +647,7 @@ static Standard_Integer BUC60811(Draw_Interpretor& di, Standard_Integer argc, co
|
||||
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);
|
||||
@ -683,7 +684,7 @@ static Standard_Integer BUC60811(Draw_Interpretor& di, Standard_Integer argc, co
|
||||
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);
|
||||
|
||||
@ -693,7 +694,7 @@ static Standard_Integer BUC60811(Draw_Interpretor& di, Standard_Integer argc, co
|
||||
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.
|
||||
@ -714,7 +715,7 @@ static Standard_Integer BUC60811(Draw_Interpretor& di, Standard_Integer argc, co
|
||||
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);
|
||||
|
||||
@ -732,7 +733,7 @@ static Standard_Integer BUC60811(Draw_Interpretor& di, Standard_Integer argc, co
|
||||
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());
|
||||
|
||||
@ -859,14 +860,14 @@ static Standard_Integer BUC60856(Draw_Interpretor& di, Standard_Integer /*argc*/
|
||||
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;
|
||||
}
|
||||
|
||||
@ -956,7 +957,7 @@ static Standard_Integer BUC60876_ (Draw_Interpretor& di,
|
||||
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;
|
||||
}
|
||||
|
||||
@ -1705,7 +1706,7 @@ static Standard_Integer BUC60951_(Draw_Interpretor& di, Standard_Integer argc, c
|
||||
}
|
||||
|
||||
Handle(AIS_Shape) res = new AIS_Shape(sh);
|
||||
myContext->Display( res );
|
||||
myContext->Display (res, Standard_True);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -63,7 +63,7 @@ static Standard_Integer BUC60738 (Draw_Interpretor& di, Standard_Integer /*argc*
|
||||
theDrawer->SetShadingAspect(theShadingAspect);
|
||||
theAISShape->SetAttributes(theDrawer);
|
||||
|
||||
aContext->Display(theAISShape);
|
||||
aContext->Display (theAISShape, Standard_True);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -66,9 +66,9 @@ static Standard_Integer OCC172 (Draw_Interpretor& di, Standard_Integer /*argc*/
|
||||
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;
|
||||
}
|
||||
|
||||
@ -99,13 +99,15 @@ static Standard_Integer OCC204 (Draw_Interpretor& di, Standard_Integer argc, co
|
||||
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);
|
||||
|
||||
aContext->UpdateCurrentViewer();
|
||||
|
||||
//printf("\n No of currents = %d", aContext->NbCurrents());
|
||||
|
||||
|
@ -46,22 +46,22 @@ static Standard_Integer BUC60857 (Draw_Interpretor& di, Standard_Integer /*argc*
|
||||
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;
|
||||
}
|
||||
|
@ -107,9 +107,9 @@ static int VTrihedronOrigins(Draw_Interpretor& di,
|
||||
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;
|
||||
}
|
||||
|
@ -772,7 +772,7 @@ void TPrsStd_AISPresentation::AISUpdate()
|
||||
if ( !(anObj == myAIS) )
|
||||
{
|
||||
if ( !aContext.IsNull() )
|
||||
aContext->Remove(myAIS);
|
||||
aContext->Remove (myAIS, Standard_True);
|
||||
|
||||
// Driver has built new AIS.
|
||||
myAIS = anObj;
|
||||
@ -893,7 +893,7 @@ void TPrsStd_AISPresentation::AISDisplay()
|
||||
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;
|
||||
|
@ -714,7 +714,7 @@ static int visos (Draw_Interpretor& di, Standard_Integer argc, const char** argv
|
||||
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";
|
||||
@ -1225,9 +1225,9 @@ static int VSubInt(Draw_Interpretor& di, Standard_Integer argc, const char** arg
|
||||
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;
|
||||
@ -3373,7 +3373,7 @@ Standard_Integer VTexture (Draw_Interpretor& theDi, Standard_Integer theArgsNb,
|
||||
anAISContext->SetDisplayMode (aTexturedIO, AIS_Shaded, Standard_False);
|
||||
if (aPreviousMode == 3)
|
||||
{
|
||||
anAISContext->RecomputePrsOnly (aTexturedIO);
|
||||
anAISContext->RecomputePrsOnly (aTexturedIO, Standard_False);
|
||||
}
|
||||
|
||||
anAISContext->Display (aTexturedIO, Standard_True);
|
||||
@ -3468,7 +3468,7 @@ Standard_Integer VTexture (Draw_Interpretor& theDi, Standard_Integer theArgsNb,
|
||||
|
||||
if (aTexturedIO->DisplayMode() == 3 || aPreviousMode == 3)
|
||||
{
|
||||
anAISContext->RecomputePrsOnly (aTexturedIO);
|
||||
anAISContext->RecomputePrsOnly (aTexturedIO, Standard_True);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -3957,7 +3957,7 @@ static int VDisplay2 (Draw_Interpretor& theDI,
|
||||
|
||||
if (aSelMode == -1)
|
||||
{
|
||||
aCtx->Erase (aShape);
|
||||
aCtx->Erase (aShape, Standard_False);
|
||||
}
|
||||
aCtx->Display (aShape, aDispMode, aSelMode,
|
||||
Standard_False, aShape->AcceptShapeDecomposition(),
|
||||
@ -4054,7 +4054,7 @@ static int VShading(Draw_Interpretor& ,Standard_Integer argc, const char** argv)
|
||||
else
|
||||
TheAISContext()->SetDeviationCoefficient(TheAisIO,0.0008,Standard_True);
|
||||
|
||||
TheAISContext()->Redisplay(TheAisIO);
|
||||
TheAISContext()->Redisplay (TheAisIO, Standard_True);
|
||||
return 0;
|
||||
}
|
||||
//==============================================================================
|
||||
@ -4891,7 +4891,7 @@ static int VPickShape( Draw_Interpretor& di, Standard_Integer argc, const char**
|
||||
|
||||
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";
|
||||
}
|
||||
|
||||
@ -4921,9 +4921,10 @@ static int VPickShape( Draw_Interpretor& di, Standard_Integer argc, const char**
|
||||
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;
|
||||
@ -4971,9 +4972,11 @@ static int VPickSelected (Draw_Interpretor& , Standard_Integer theArgNb, const c
|
||||
|
||||
Handle(AIS_Shape) aNewShape = new AIS_Shape (aShape);
|
||||
GetMapOfAIS().Bind (aNewShape, aCurrentName);
|
||||
TheAISContext()->Display (aNewShape);
|
||||
TheAISContext()->Display (aNewShape, Standard_False);
|
||||
}
|
||||
|
||||
TheAISContext()->UpdateCurrentViewer();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -5163,7 +5166,7 @@ static Standard_Integer vr(Draw_Interpretor& , Standard_Integer , const char** a
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -135,9 +135,9 @@ static Standard_Integer VBLEND(Draw_Interpretor& di, Standard_Integer narg, cons
|
||||
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;
|
||||
}
|
||||
|
||||
|
@ -575,7 +575,7 @@ static int VAxisBuilder(Draw_Interpretor& di, Standard_Integer argc, const char*
|
||||
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
|
||||
@ -613,7 +613,7 @@ static int VAxisBuilder(Draw_Interpretor& di, Standard_Integer argc, const char*
|
||||
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
|
||||
{
|
||||
@ -627,7 +627,7 @@ static int VAxisBuilder(Draw_Interpretor& di, Standard_Integer argc, const char*
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
@ -662,7 +662,7 @@ static int VAxisBuilder(Draw_Interpretor& di, Standard_Integer argc, const char*
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
@ -697,7 +697,7 @@ static int VAxisBuilder(Draw_Interpretor& di, Standard_Integer argc, const char*
|
||||
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);
|
||||
|
||||
}
|
||||
|
||||
@ -745,7 +745,7 @@ static int VPointBuilder(Draw_Interpretor& di, Standard_Integer argc, const char
|
||||
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
|
||||
@ -769,7 +769,7 @@ static int VPointBuilder(Draw_Interpretor& di, Standard_Integer argc, const char
|
||||
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
|
||||
{
|
||||
@ -782,7 +782,7 @@ static int VPointBuilder(Draw_Interpretor& di, Standard_Integer argc, const char
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
@ -945,7 +945,7 @@ static Standard_Integer VPlaneBuilder (Draw_Interpretor& /*di*/,
|
||||
anAISPlane->SetTypeOfSensitivity (Select3D_TypeOfSensitivity (aType));
|
||||
}
|
||||
}
|
||||
TheAISContext()->Display(anAISPlane);
|
||||
TheAISContext()->Display (anAISPlane, Standard_True);
|
||||
}
|
||||
|
||||
// The first argument is an AIS_Axis
|
||||
@ -1003,7 +1003,7 @@ static Standard_Integer VPlaneBuilder (Draw_Interpretor& /*di*/,
|
||||
anAISPlane->SetTypeOfSensitivity (Select3D_TypeOfSensitivity (aType));
|
||||
}
|
||||
}
|
||||
TheAISContext()->Display(anAISPlane);
|
||||
TheAISContext()->Display (anAISPlane, Standard_True);
|
||||
|
||||
}
|
||||
// The first argumnet is an AIS_Plane
|
||||
@ -1058,7 +1058,7 @@ static Standard_Integer VPlaneBuilder (Draw_Interpretor& /*di*/,
|
||||
anAISPlane->SetTypeOfSensitivity (Select3D_TypeOfSensitivity (aType));
|
||||
}
|
||||
}
|
||||
TheAISContext()->Display(anAISPlane);
|
||||
TheAISContext()->Display (anAISPlane, Standard_True);
|
||||
}
|
||||
// Error
|
||||
else
|
||||
@ -1118,7 +1118,7 @@ static Standard_Integer VPlaneBuilder (Draw_Interpretor& /*di*/,
|
||||
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)
|
||||
@ -1145,7 +1145,7 @@ static Standard_Integer VPlaneBuilder (Draw_Interpretor& /*di*/,
|
||||
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
|
||||
{
|
||||
@ -1189,7 +1189,7 @@ static Standard_Integer VPlaneBuilder (Draw_Interpretor& /*di*/,
|
||||
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)
|
||||
{
|
||||
@ -1201,7 +1201,7 @@ static Standard_Integer VPlaneBuilder (Draw_Interpretor& /*di*/,
|
||||
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
|
||||
{
|
||||
@ -1253,7 +1253,7 @@ static Standard_Integer VPlaneBuilder (Draw_Interpretor& /*di*/,
|
||||
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
|
||||
{
|
||||
@ -1325,7 +1325,7 @@ static Standard_Integer VPlaneBuilder (Draw_Interpretor& /*di*/,
|
||||
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
|
||||
{
|
||||
@ -1506,7 +1506,7 @@ static int VLineBuilder(Draw_Interpretor& di, Standard_Integer argc, const char*
|
||||
// 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);
|
||||
|
||||
}
|
||||
|
||||
@ -1527,7 +1527,7 @@ static int VLineBuilder(Draw_Interpretor& di, Standard_Integer argc, const char*
|
||||
|
||||
Handle(AIS_Line) theAISLine= new AIS_Line(myCartPointA,myCartPointB );
|
||||
GetMapOfAIS().Bind(theAISLine,argv[1] );
|
||||
TheAISContext()->Display(theAISLine );
|
||||
TheAISContext()->Display (theAISLine, Standard_True);
|
||||
|
||||
}
|
||||
|
||||
@ -1563,7 +1563,7 @@ static int VLineBuilder(Draw_Interpretor& di, Standard_Integer argc, const char*
|
||||
|
||||
Handle(AIS_Line) theAISLine= new AIS_Line(myCartPointA,myCartPointB );
|
||||
GetMapOfAIS().Bind(theAISLine,argv[1] );
|
||||
TheAISContext()->Display(theAISLine );
|
||||
TheAISContext()->Display (theAISLine, Standard_True);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -1709,7 +1709,7 @@ void DisplayCircle (Handle (Geom_Circle) theGeomCircle,
|
||||
GetMapOfAIS().Bind(aCircle, theName);
|
||||
|
||||
// Display the circle
|
||||
TheAISContext()->Display(aCircle);
|
||||
TheAISContext()->Display (aCircle, Standard_True);
|
||||
|
||||
}
|
||||
|
||||
@ -2874,7 +2874,7 @@ static int VComputeHLR (Draw_Interpretor& di,
|
||||
// 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 ();
|
||||
|
||||
@ -3718,7 +3718,7 @@ static Standard_Integer VConnect (Draw_Interpretor& /*di*/,
|
||||
GetMapOfAIS().Bind (anOriginObject, aName);
|
||||
|
||||
// Display connected object
|
||||
TheAISContext()->Display (anOriginObject);
|
||||
TheAISContext()->Display (anOriginObject, Standard_True);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -3964,7 +3964,7 @@ static Standard_Integer VAddConnected (Draw_Interpretor& di,
|
||||
aTrsf.SetTranslation (gp_Vec (aX, aY, aZ));
|
||||
|
||||
anAssembly->Connect (anIObj, aTrsf);
|
||||
TheAISContext()->Display (anAssembly);
|
||||
TheAISContext()->Display (anAssembly, Standard_False);
|
||||
TheAISContext()->RecomputeSelectionOnly (anAssembly);
|
||||
aContext->UpdateCurrentViewer();
|
||||
|
||||
@ -4413,7 +4413,7 @@ static Standard_Integer VTriangle (Draw_Interpretor& /*di*/,
|
||||
GetMapOfAIS().Bind(aTriangle, aName);
|
||||
|
||||
// Display triangle
|
||||
TheAISContext()->Display(aTriangle);
|
||||
TheAISContext()->Display (aTriangle, Standard_True);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -4528,7 +4528,7 @@ static Standard_Integer VSegment (Draw_Interpretor& /*di*/,
|
||||
GetMapOfAIS().Bind(aSegment, aName);
|
||||
|
||||
// Display segment
|
||||
TheAISContext()->Display(aSegment);
|
||||
TheAISContext()->Display (aSegment, Standard_True);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -4788,7 +4788,7 @@ static Standard_Integer VShowFaceBoundary (Draw_Interpretor& /*di*/,
|
||||
|
||||
aDrawer->SetFaceBoundaryAspect (aBoundaryAspect);
|
||||
|
||||
TheAISContext()->Redisplay (anInterObj);
|
||||
TheAISContext()->Redisplay (anInterObj, Standard_True);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -5464,7 +5464,7 @@ static int VSetEdgeType (Draw_Interpretor& theDI,
|
||||
// Update shape presentation as aspect parameters were changed
|
||||
if (isForceRedisplay)
|
||||
{
|
||||
ViewerTest::GetAISContext()->Redisplay (anObject);
|
||||
ViewerTest::GetAISContext()->Redisplay (anObject, Standard_False);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -5528,7 +5528,7 @@ static int VUnsetEdgeType (Draw_Interpretor& theDI,
|
||||
// Update shape presentation as aspect parameters were changed
|
||||
if (isForceRedisplay)
|
||||
{
|
||||
ViewerTest::GetAISContext()->Redisplay (anObject);
|
||||
ViewerTest::GetAISContext()->Redisplay (anObject, Standard_False);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1758,7 +1758,7 @@ static int VMoveDim (Draw_Interpretor& theDi, Standard_Integer theArgNum, const
|
||||
Handle(AIS_Relation) aRelation = Handle(AIS_Relation)::DownCast (aPickedObj);
|
||||
aPoint = Get3DPointAtMousePosition();
|
||||
aRelation->SetPosition (aPoint);
|
||||
TheAISContext()->Redisplay (aRelation);
|
||||
TheAISContext()->Redisplay (aRelation, Standard_True);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1795,7 +1795,7 @@ static int VMoveDim (Draw_Interpretor& theDi, Standard_Integer theArgNum, const
|
||||
}
|
||||
|
||||
aDim->SetTextPosition (aPoint);
|
||||
TheAISContext()->Redisplay (aDim);
|
||||
TheAISContext()->Redisplay (aDim, Standard_True);
|
||||
}
|
||||
|
||||
}
|
||||
@ -1805,13 +1805,13 @@ static int VMoveDim (Draw_Interpretor& theDi, Standard_Integer theArgNum, const
|
||||
{
|
||||
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;
|
||||
|
@ -1437,7 +1437,7 @@ void VT_ProcessKeyPress (const char* buf_ret)
|
||||
|
||||
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);
|
||||
@ -1451,7 +1451,7 @@ void VT_ProcessKeyPress (const char* buf_ret)
|
||||
|
||||
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);
|
||||
@ -1484,7 +1484,7 @@ void VT_ProcessKeyPress (const char* buf_ret)
|
||||
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);
|
||||
@ -1899,7 +1899,7 @@ static LRESULT WINAPI AdvViewerWindowProc( HWND hwnd,
|
||||
if (!GetActiveAISManipulator().IsNull())
|
||||
{
|
||||
GetActiveAISManipulator()->StopTransform();
|
||||
ViewerTest::GetAISContext()->ClearSelected();
|
||||
ViewerTest::GetAISContext()->ClearSelected (Standard_True);
|
||||
}
|
||||
|
||||
if (ViewerTest::GetAISContext()->IsDisplayed (GetRubberBand()))
|
||||
@ -1919,7 +1919,7 @@ static LRESULT WINAPI AdvViewerWindowProc( HWND hwnd,
|
||||
if (!GetActiveAISManipulator().IsNull())
|
||||
{
|
||||
GetActiveAISManipulator()->StopTransform (Standard_False);
|
||||
ViewerTest::GetAISContext()->ClearSelected();
|
||||
ViewerTest::GetAISContext()->ClearSelected (Standard_True);
|
||||
}
|
||||
IsDragged = Standard_False;
|
||||
}
|
||||
@ -2340,24 +2340,24 @@ int ViewerMainLoop(Standard_Integer argc, const char** argv)
|
||||
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();
|
||||
@ -4916,7 +4916,7 @@ static int VLayerLine(Draw_Interpretor& di, Standard_Integer argc, const char**
|
||||
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,
|
||||
@ -6940,7 +6940,7 @@ static Standard_Integer VChangeSelected (Draw_Interpretor& di,
|
||||
return 1;
|
||||
}
|
||||
|
||||
aContext->AddOrRemoveSelected(anAISObject);
|
||||
aContext->AddOrRemoveSelected(anAISObject, Standard_True);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@ -9781,7 +9781,7 @@ static int VManipulator (Draw_Interpretor& theDi,
|
||||
|
||||
aManipulator->Detach();
|
||||
aMapAIS.UnBind2 (aName);
|
||||
ViewerTest::GetAISContext()->Remove (aManipulator);
|
||||
ViewerTest::GetAISContext()->Remove (aManipulator, Standard_True);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -9950,7 +9950,7 @@ static int VManipulator (Draw_Interpretor& theDi,
|
||||
aManipulator->Transform (aT);
|
||||
}
|
||||
|
||||
ViewerTest::GetAISContext()->Redisplay (aManipulator);
|
||||
ViewerTest::GetAISContext()->Redisplay (aManipulator, Standard_True);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -992,7 +992,7 @@ static Standard_Integer XShowFaceBoundary (Draw_Interpretor& di,
|
||||
|
||||
aDrawer->SetFaceBoundaryAspect (aBoundaryAspect);
|
||||
|
||||
aContext->Redisplay (anInteractive);
|
||||
aContext->Redisplay (anInteractive, Standard_True);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -389,7 +389,7 @@ static Standard_Integer setcolor
|
||||
if( aContext.IsNull() )
|
||||
di << "The context is null\n";
|
||||
else
|
||||
aContext->Redisplay( aMesh );
|
||||
aContext->Redisplay (aMesh, Standard_True);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
@ -435,7 +435,7 @@ static Standard_Integer meshmat
|
||||
if( aContext.IsNull() )
|
||||
di << "The context is null\n";
|
||||
else
|
||||
aContext->Redisplay( aMesh );
|
||||
aContext->Redisplay (aMesh, Standard_True);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
@ -459,7 +459,7 @@ static Standard_Integer shrink
|
||||
if( aContext.IsNull() )
|
||||
di << "The context is null\n";
|
||||
else
|
||||
aContext->Redisplay( aMesh );
|
||||
aContext->Redisplay (aMesh, Standard_True);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
@ -487,7 +487,7 @@ static Standard_Integer closed (Draw_Interpretor& theDI, Standard_Integer theArg
|
||||
}
|
||||
else
|
||||
{
|
||||
aContext->Redisplay (aMesh);
|
||||
aContext->Redisplay (aMesh, Standard_True);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -519,7 +519,7 @@ static Standard_Integer mdisplay
|
||||
}
|
||||
Standard_ENABLE_DEPRECATION_WARNINGS
|
||||
|
||||
aContext->Display( aMesh );
|
||||
aContext->Display (aMesh, Standard_True);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -549,7 +549,7 @@ static Standard_Integer merase
|
||||
}
|
||||
Standard_ENABLE_DEPRECATION_WARNINGS
|
||||
|
||||
aContext->Erase( aMesh );
|
||||
aContext->Erase (aMesh, Standard_True);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -606,10 +606,10 @@ static Standard_Integer hidesel
|
||||
}
|
||||
}
|
||||
}
|
||||
aContext->ClearSelected();
|
||||
aContext->ClearSelected (Standard_False);
|
||||
aMesh->SetHiddenNodes( aHiddenNodes );
|
||||
aMesh->SetHiddenElems( aHiddenElements );
|
||||
aContext->Redisplay( aMesh );
|
||||
aContext->Redisplay (aMesh, Standard_True);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -660,7 +660,7 @@ static Standard_Integer showonly
|
||||
}
|
||||
aMesh->SetHiddenNodes( aHiddenNodes );
|
||||
aMesh->SetHiddenElems( aHiddenElements );
|
||||
aContext->Redisplay( aMesh );
|
||||
aContext->Redisplay (aMesh, Standard_True);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -690,7 +690,7 @@ static Standard_Integer showall
|
||||
{
|
||||
aMesh->SetHiddenNodes( new TColStd_HPackedMapOfInteger() );
|
||||
aMesh->SetHiddenElems( new TColStd_HPackedMapOfInteger() );
|
||||
aContext->Redisplay( aMesh );
|
||||
aContext->Redisplay (aMesh, Standard_True);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@ -851,7 +851,7 @@ static Standard_Integer meshcolors( Draw_Interpretor& di,
|
||||
|
||||
aMesh->GetDrawer()->SetBoolean (MeshVS_DA_ColorReflection, aReflection != 0);
|
||||
|
||||
anIC->Redisplay( aMesh );
|
||||
anIC->Redisplay (aMesh, Standard_True);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1000,7 +1000,7 @@ static Standard_Integer meshvectors( Draw_Interpretor& di,
|
||||
aMesh->GetDrawer()->SetDouble ( MeshVS_DA_VectorArrowPart, anArrowPart );
|
||||
}
|
||||
|
||||
anIC->Redisplay( aMesh );
|
||||
anIC->Redisplay (aMesh, Standard_True);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@ -1123,7 +1123,7 @@ static Standard_Integer meshdeform( Draw_Interpretor& di,
|
||||
|
||||
aMesh->SetDataSource(aDefDS);
|
||||
|
||||
anIC->Redisplay( aMesh );
|
||||
anIC->Redisplay (aMesh, Standard_False);
|
||||
|
||||
Handle( V3d_View ) aView = ViewerTest::CurrentView();
|
||||
if ( !aView.IsNull() )
|
||||
@ -1177,7 +1177,7 @@ static Standard_Integer mesh_edge_width( Draw_Interpretor& di,
|
||||
}
|
||||
|
||||
aDrawer->SetDouble( MeshVS_DA_EdgeWidth, aWidth );
|
||||
anIC->Redisplay( aMesh );
|
||||
anIC->Redisplay (aMesh, Standard_True);
|
||||
}
|
||||
catch ( Standard_Failure )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user