mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-24 13:50:49 +03:00
0028088: Visualization, AIS_InteractiveContext - drop default value for Update Viewer parameter
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
Reference in New Issue
Block a user