mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0028088: Visualization, AIS_InteractiveContext - drop default value for Update Viewer parameter
This commit is contained in:
@@ -371,7 +371,7 @@ static Standard_Integer OCC10bug (Draw_Interpretor& di, Standard_Integer argc, c
|
||||
theAISPlaneTri->SetLength(Length);
|
||||
|
||||
GetMapOfAIS().Bind ( theAISPlaneTri, name);
|
||||
aContext->Display(theAISPlaneTri );
|
||||
aContext->Display (theAISPlaneTri, Standard_True);
|
||||
}
|
||||
|
||||
Standard_Real getLength = theAISPlaneTri->GetLength();
|
||||
|
@@ -122,7 +122,7 @@ static Standard_Integer OCC128 (Draw_Interpretor& di, Standard_Integer /*argc*/
|
||||
Graphic3d_MaterialAspect mat(Graphic3d_NOM_PLASTIC);
|
||||
AS->SetMaterial(mat);
|
||||
AS->SetColor(Quantity_NOC_RED);
|
||||
myAISContext->Display(AS);
|
||||
myAISContext->Display (AS, Standard_False);
|
||||
|
||||
gp_Trsf TouchTrsf;
|
||||
TouchTrsf.SetTranslation(gp_Vec(20, 20, 0));
|
||||
@@ -215,33 +215,35 @@ static Standard_Integer OCC136 (Draw_Interpretor& di, Standard_Integer argc, con
|
||||
return 1;
|
||||
}
|
||||
|
||||
anAISCtx->EraseAll();
|
||||
anAISCtx->EraseAll (Standard_False);
|
||||
|
||||
//load primitives to context
|
||||
Handle(AIS_InteractiveObject) aSh1 = new AIS_Shape(aBox);
|
||||
anAISCtx->Display(aSh1);
|
||||
anAISCtx->Display (aSh1, Standard_False);
|
||||
|
||||
Handle(AIS_InteractiveObject) aSh2 = new AIS_Shape(aSphere);
|
||||
anAISCtx->Display(aSh2);
|
||||
anAISCtx->Display (aSh2, Standard_False);
|
||||
|
||||
Handle(AIS_InteractiveObject) aSh3 = new AIS_Shape(aCone);
|
||||
anAISCtx->Display(aSh3);
|
||||
anAISCtx->Display (aSh3, Standard_False);
|
||||
|
||||
Handle(AIS_InteractiveObject) aSh4 = new AIS_Shape(aCyl);
|
||||
anAISCtx->Display(aSh4);
|
||||
anAISCtx->Display (aSh4, Standard_False);
|
||||
|
||||
//set selected
|
||||
anAISCtx->InitSelected();
|
||||
anAISCtx->AddOrRemoveSelected(aSh1);
|
||||
anAISCtx->AddOrRemoveSelected(aSh2);
|
||||
anAISCtx->AddOrRemoveSelected(aSh3);
|
||||
anAISCtx->AddOrRemoveSelected(aSh4);
|
||||
anAISCtx->AddOrRemoveSelected (aSh1, Standard_False);
|
||||
anAISCtx->AddOrRemoveSelected (aSh2, Standard_False);
|
||||
anAISCtx->AddOrRemoveSelected (aSh3, Standard_False);
|
||||
anAISCtx->AddOrRemoveSelected (aSh4, Standard_False);
|
||||
|
||||
//remove all this objects from context
|
||||
anAISCtx->Remove (aSh1, Standard_False);
|
||||
anAISCtx->Remove (aSh2, Standard_False);
|
||||
anAISCtx->Remove (aSh3, Standard_False);
|
||||
anAISCtx->Remove (aSh4, Standard_False);
|
||||
|
||||
anAISCtx->UpdateCurrentViewer();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -639,7 +641,7 @@ static Standard_Integer OCC297 (Draw_Interpretor& di,Standard_Integer /*argc*/,
|
||||
myAISContext->EraseAll(Standard_False);
|
||||
Handle(Geom_CartesianPoint) GEOMPoint = new Geom_CartesianPoint(g_pnt);
|
||||
Handle(AIS_Point) AISPoint = new AIS_Point(GEOMPoint);
|
||||
myAISContext->Display(AISPoint);
|
||||
myAISContext->Display (AISPoint, Standard_True);
|
||||
|
||||
BRepPrimAPI_MakeHalfSpace half_(sh_, g_pnt);
|
||||
TopoDS_Solid sol1_ = half_.Solid();
|
||||
@@ -4564,10 +4566,10 @@ static Standard_Integer OCC12584 (Draw_Interpretor& di, Standard_Integer argc, c
|
||||
aCS->SetSize (aWinWidth, aWinHeight);
|
||||
if ( !V.IsNull() ) {
|
||||
if (mode == 0) {
|
||||
aContext->Display (aCS);
|
||||
aContext->Display (aCS, Standard_True);
|
||||
}
|
||||
if (mode == 1) {
|
||||
aContext->Erase (aCS);
|
||||
aContext->Erase (aCS, Standard_False);
|
||||
V->UpdateLights();
|
||||
V->Update();
|
||||
}
|
||||
|
@@ -614,8 +614,7 @@ static Standard_Integer BUC60920(Draw_Interpretor& di, Standard_Integer /*argc*
|
||||
myV3dView->Convert(Xv,Yv,Xp,Yp);
|
||||
// cout<<Xp<<"\t"<<Yp<<endl;
|
||||
|
||||
myAISContext->MoveTo( Xp,Yp, myV3dView );
|
||||
myAISContext->MoveTo( Xp,Yp, myV3dView );
|
||||
myAISContext->MoveTo (Xp,Yp, myV3dView, Standard_True);
|
||||
|
||||
// if (myAISContext->IsHilighted(anAISShape))
|
||||
// cout << "has hilighted shape : OK" << endl;
|
||||
|
@@ -46,14 +46,14 @@ static Standard_Integer BUC60720 (Draw_Interpretor& di,Standard_Integer argc,con
|
||||
{
|
||||
theObject1 = new QABugs_PresentableObject();
|
||||
theObject1->SetDisplayMode(0);
|
||||
myAISContext->Display(theObject1);
|
||||
myAISContext->Display (theObject1, Standard_True);
|
||||
}
|
||||
} else if(Draw::Atoi(argv[1]) == 1) {
|
||||
if ( theObject2.IsNull() )
|
||||
{
|
||||
theObject2 = new QABugs_PresentableObject();
|
||||
theObject2->SetDisplayMode(1);
|
||||
myAISContext->Display(theObject2);
|
||||
myAISContext->Display (theObject2, Standard_True);
|
||||
}
|
||||
} else {
|
||||
di << "Usage : " << argv[0] << " 0/1\n";
|
||||
|
@@ -145,7 +145,7 @@ static Standard_Integer BUC60814(Draw_Interpretor& di, Standard_Integer argc, c
|
||||
Handle(AIS_InteractiveObject) aTrihedron;
|
||||
Handle(Geom_Axis2Placement) aTrihedronAxis=new Geom_Axis2Placement(gp::XOY());
|
||||
aTrihedron=new AIS_Trihedron(aTrihedronAxis);
|
||||
myAISContext->Display(aTrihedron);
|
||||
myAISContext->Display (aTrihedron, Standard_False);
|
||||
|
||||
//Circle
|
||||
gp_Pnt P(10,10,10);
|
||||
@@ -154,13 +154,13 @@ static Standard_Integer BUC60814(Draw_Interpretor& di, Standard_Integer argc, c
|
||||
|
||||
Handle(Geom_Circle) ahCircle=new Geom_Circle(aAx2,20);
|
||||
Handle(AIS_InteractiveObject) aCircle=new AIS_Circle(ahCircle);
|
||||
myAISContext->Display(aCircle);
|
||||
myAISContext->Display (aCircle, Standard_False);
|
||||
|
||||
const Handle(Prs3d_Drawer)& aSelStyle = myAISContext->SelectionStyle();
|
||||
aSelStyle->SetColor (Quantity_NOC_BLUE1);
|
||||
|
||||
myAISContext->AddOrRemoveSelected(aTrihedron);
|
||||
myAISContext->AddOrRemoveSelected(aCircle);
|
||||
myAISContext->AddOrRemoveSelected (aTrihedron, Standard_False);
|
||||
myAISContext->AddOrRemoveSelected (aCircle, Standard_True);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -197,7 +197,7 @@ static Standard_Integer BUC60774 (Draw_Interpretor& theDi,
|
||||
Standard_Integer aXPixMax = aWinWidth;
|
||||
Standard_Integer aYPixMax = aWinHeight;
|
||||
|
||||
AIS_StatusOfPick aPickStatus = anAISContext->Select (aXPixMin, aYPixMin, aXPixMax, aYPixMax, aV3dView);
|
||||
AIS_StatusOfPick aPickStatus = anAISContext->Select (aXPixMin, aYPixMin, aXPixMax, aYPixMax, aV3dView, Standard_False);
|
||||
theDi << (aPickStatus == AIS_SOP_NothingSelected
|
||||
? "status = AIS_SOP_NothingSelected : OK"
|
||||
: "status = AIS_SOP_NothingSelected : bugged - Faulty ");
|
||||
@@ -206,7 +206,7 @@ static Standard_Integer BUC60774 (Draw_Interpretor& theDi,
|
||||
theDi.Eval ("box b 10 10 10");
|
||||
theDi.Eval (" vdisplay b");
|
||||
|
||||
aPickStatus = anAISContext->Select (aXPixMin, aYPixMin, aXPixMax, aYPixMax, aV3dView);
|
||||
aPickStatus = anAISContext->Select (aXPixMin, aYPixMin, aXPixMax, aYPixMax, aV3dView, Standard_False);
|
||||
theDi << (aPickStatus == AIS_SOP_OneSelected
|
||||
? "status = AIS_SOP_OneSelected : OK"
|
||||
: "status = AIS_SOP_OneSelected : bugged - Faulty ");
|
||||
@@ -215,7 +215,7 @@ static Standard_Integer BUC60774 (Draw_Interpretor& theDi,
|
||||
theDi.Eval ("box w 20 20 20 20 20 20");
|
||||
theDi.Eval (" vdisplay w");
|
||||
|
||||
aPickStatus = anAISContext->Select (aXPixMin, aYPixMin, aXPixMax, aYPixMax, aV3dView);
|
||||
aPickStatus = anAISContext->Select (aXPixMin, aYPixMin, aXPixMax, aYPixMax, aV3dView, Standard_True);
|
||||
theDi << (aPickStatus == AIS_SOP_SeveralSelected
|
||||
? "status = AIS_SOP_SeveralSelected : OK"
|
||||
: "status = AIS_SOP_SeveralSelected : bugged - Faulty ");
|
||||
@@ -251,7 +251,7 @@ static Standard_Integer BUC60972 (Draw_Interpretor& di, Standard_Integer argc, c
|
||||
di << argv[5] << " " << Draw::Atof(argv[4]) << "\n";
|
||||
|
||||
Handle(AIS_AngleDimension) aDim = new AIS_AngleDimension(aFirst, aSecond);
|
||||
aContext->Display(aDim);
|
||||
aContext->Display (aDim, Standard_True);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -338,7 +338,7 @@ static Standard_Integer OCC218bug (Draw_Interpretor& di, Standard_Integer argc,
|
||||
theAISPlaneTri->SetYLabel(Ylabel);
|
||||
|
||||
GetMapOfAIS().Bind ( theAISPlaneTri, name);
|
||||
aContext->Display(theAISPlaneTri );
|
||||
aContext->Display (theAISPlaneTri, Standard_True);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -692,8 +692,8 @@ static Standard_Integer OCC301 (Draw_Interpretor& di, Standard_Integer argc, con
|
||||
TopoDS_Edge E1 = BRepBuilderAPI_MakeEdge(p1, p2);
|
||||
TopoDS_Edge E2 = BRepBuilderAPI_MakeEdge(p2, p3);
|
||||
|
||||
context->Display(new AIS_Shape(E1));
|
||||
context->Display(new AIS_Shape(E2));
|
||||
context->Display (new AIS_Shape(E1), Standard_False);
|
||||
context->Display (new AIS_Shape(E2), Standard_True);
|
||||
|
||||
gp_Pnt plnpt(0, 0, 0);
|
||||
gp_Dir plndir(0, 0, 1);
|
||||
@@ -788,7 +788,7 @@ static Standard_Integer OCC70 (Draw_Interpretor& di, Standard_Integer argc, cons
|
||||
|
||||
Handle(V3d_View) V3dView = ViewerTest::CurrentView();
|
||||
|
||||
aContext->Select(Polyline,V3dView);
|
||||
aContext->Select (Polyline, V3dView, Standard_False);
|
||||
aContext->UpdateCurrentViewer();
|
||||
|
||||
return 0;
|
||||
|
@@ -94,7 +94,7 @@ static Standard_Integer BUC60842 (Draw_Interpretor& di, Standard_Integer /*argc*
|
||||
if(!aContext.IsNull()) {
|
||||
Handle(AIS_Shape) aisp =
|
||||
new AIS_Shape (BRepBuilderAPI_MakeEdge(GeomAPI::To3d(curve2d, pln)).Edge());
|
||||
aContext->Display (aisp);
|
||||
aContext->Display (aisp, Standard_False);
|
||||
}
|
||||
|
||||
Handle(Geom2d_Curve) fromcurve2d = GeomAPI::To2d (cir, pln);
|
||||
@@ -103,7 +103,7 @@ static Standard_Integer BUC60842 (Draw_Interpretor& di, Standard_Integer /*argc*
|
||||
if(!aContext.IsNull()) {
|
||||
Handle(AIS_Shape) aisp =
|
||||
new AIS_Shape (BRepBuilderAPI_MakeEdge(GeomAPI::To3d(fromcurve2d, pln)).Edge());
|
||||
aContext->Display (aisp);
|
||||
aContext->Display (aisp, Standard_False);
|
||||
}
|
||||
|
||||
Geom2dAdaptor_Curve acur (curve2d), afromcur (fromcurve2d);
|
||||
@@ -117,9 +117,11 @@ static Standard_Integer BUC60842 (Draw_Interpretor& di, Standard_Integer /*argc*
|
||||
DrawTrSurf::Set(st,glin);
|
||||
if(!aContext.IsNull()) {
|
||||
Handle(AIS_Shape) aisp =
|
||||
new AIS_Shape (BRepBuilderAPI_MakeEdge(GeomAPI::To3d(glin, pln)).Edge()); aContext->Display (aisp);
|
||||
new AIS_Shape (BRepBuilderAPI_MakeEdge(GeomAPI::To3d(glin, pln)).Edge());
|
||||
aContext->Display (aisp, Standard_False);
|
||||
}
|
||||
}
|
||||
aContext->UpdateCurrentViewer();
|
||||
di << " Is Done = \n" << (Standard_Integer) lintan.IsDone();
|
||||
return 0;
|
||||
}
|
||||
@@ -210,7 +212,7 @@ static Standard_Integer BUC60970 (Draw_Interpretor& di, Standard_Integer argc, c
|
||||
di << "total no of wires are ............. " << i << "\n";
|
||||
|
||||
TopoDS_Wire spineWire = bRepSpineWire.Wire();
|
||||
aContext->Display(new AIS_Shape(spineWire));
|
||||
aContext->Display (new AIS_Shape(spineWire), Standard_False);
|
||||
|
||||
DBRep::Set("slineW",spineWire);
|
||||
|
||||
@@ -226,7 +228,7 @@ static Standard_Integer BUC60970 (Draw_Interpretor& di, Standard_Integer argc, c
|
||||
gp_Circ gpCirc(gpAx2, 2.5);
|
||||
BRepBuilderAPI_MakeWire aMWire(BRepBuilderAPI_MakeEdge(new Geom_Circle(gpCirc)).Edge());
|
||||
TopoDS_Wire topoWire(aMWire);
|
||||
aContext->Display(new AIS_Shape(topoWire));
|
||||
aContext->Display (new AIS_Shape(topoWire), Standard_False);
|
||||
|
||||
DBRep::Set("topoW",topoWire);
|
||||
|
||||
@@ -234,7 +236,7 @@ static Standard_Integer BUC60970 (Draw_Interpretor& di, Standard_Integer argc, c
|
||||
bRepPipe.Add(topoWire);
|
||||
bRepPipe.Build();
|
||||
|
||||
aContext->Display(new AIS_Shape(bRepPipe.Shape()));
|
||||
aContext->Display (new AIS_Shape(bRepPipe.Shape()), Standard_True);
|
||||
|
||||
DBRep::Set(argv[2],bRepPipe.Shape());
|
||||
|
||||
@@ -260,7 +262,7 @@ static Standard_Integer BUC60818(Draw_Interpretor& di, Standard_Integer argc, c
|
||||
Handle(AIS_Trihedron) aTrihedron;
|
||||
Handle(Geom_Axis2Placement) aTrihedronAxis=new Geom_Axis2Placement(gp::XOY());
|
||||
aTrihedron=new AIS_Trihedron(aTrihedronAxis);
|
||||
myAISContext->Display(aTrihedron);
|
||||
myAISContext->Display (aTrihedron, Standard_True);
|
||||
|
||||
Standard_DISABLE_DEPRECATION_WARNINGS
|
||||
myAISContext->OpenLocalContext();
|
||||
@@ -276,8 +278,8 @@ static Standard_Integer BUC60818(Draw_Interpretor& di, Standard_Integer argc, c
|
||||
Standard_Integer Xp,Yp;
|
||||
myV3dView->Convert(Xv,Yv,Xp,Yp);
|
||||
|
||||
myAISContext->MoveTo( Xp,Yp, myV3dView );
|
||||
myAISContext->MoveTo( Xp,Yp, myV3dView );
|
||||
myAISContext->MoveTo (Xp,Yp, myV3dView, Standard_False);
|
||||
myAISContext->MoveTo (Xp,Yp, myV3dView, Standard_True);
|
||||
|
||||
if (myAISContext->HasDetected( ))
|
||||
di << "has detected shape : OK" << "\n";
|
||||
@@ -335,7 +337,7 @@ static Standard_Integer BUC60915_1(Draw_Interpretor& di, Standard_Integer argc,
|
||||
Handle(AIS_LengthDimension) len = new AIS_LengthDimension(V2, V3, pln->Pln());
|
||||
anAspect->ArrowAspect()->SetLength (30.0);
|
||||
len->SetDimensionAspect (anAspect);
|
||||
context->Display(len);
|
||||
context->Display (len, Standard_False);
|
||||
/***************************************/
|
||||
//dimension "L 90"
|
||||
/***************************************/
|
||||
@@ -343,13 +345,13 @@ static Standard_Integer BUC60915_1(Draw_Interpretor& di, Standard_Integer argc,
|
||||
len1->SetDimensionAspect (anAspect);
|
||||
len1->SetFlyout (30.0);
|
||||
anAspect->ArrowAspect()->SetLength (100.0);
|
||||
context->Display(len1);
|
||||
context->Display (len1, Standard_False);
|
||||
/***************************************/
|
||||
//dimension "L 150"
|
||||
/***************************************/
|
||||
Handle(AIS_LengthDimension) len2 = new AIS_LengthDimension(V1, V2, pln->Pln());
|
||||
len2->SetDimensionAspect (anAspect);
|
||||
context->Display(len2);
|
||||
context->Display (len2, Standard_False);
|
||||
/***************************************/
|
||||
//dimension "R 88.58"
|
||||
/***************************************/
|
||||
@@ -357,7 +359,7 @@ static Standard_Integer BUC60915_1(Draw_Interpretor& di, Standard_Integer argc,
|
||||
TopoDS_Edge E1 = BRepBuilderAPI_MakeEdge(cir,gp_Pnt(191.09,0,0.),gp_Pnt(191.09,-177.16,0.) );
|
||||
Handle(AIS_RadiusDimension) dim1 = new AIS_RadiusDimension(E1);
|
||||
dim1->SetDimensionAspect (anAspect);
|
||||
context->Display(dim1);
|
||||
context->Display (dim1, Standard_False);
|
||||
/***************************************/
|
||||
//dimension "R 43.80"
|
||||
/***************************************/
|
||||
@@ -366,7 +368,7 @@ static Standard_Integer BUC60915_1(Draw_Interpretor& di, Standard_Integer argc,
|
||||
dim1 = new AIS_RadiusDimension(E_cir1);
|
||||
anAspect->ArrowAspect()->SetLength (60.0);
|
||||
dim1->SetDimensionAspect (anAspect);
|
||||
context->Display(dim1);
|
||||
context->Display (dim1, Standard_False);
|
||||
/***************************************/
|
||||
//dimension "R 17.86"
|
||||
/***************************************/
|
||||
@@ -375,7 +377,7 @@ static Standard_Integer BUC60915_1(Draw_Interpretor& di, Standard_Integer argc,
|
||||
dim1 = new AIS_RadiusDimension(E_cir2);
|
||||
anAspect->ArrowAspect()->SetLength (40.0);
|
||||
dim1->SetDimensionAspect (anAspect);
|
||||
context->Display(dim1);
|
||||
context->Display (dim1, Standard_True);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -396,13 +398,13 @@ static Standard_Integer OCC138 (Draw_Interpretor& di, Standard_Integer /*argc*/
|
||||
Handle(AIS_InteractiveObject) ais2 = new AIS_Shape(box2.Shape());
|
||||
Handle(AIS_InteractiveObject) ais3 = new AIS_Shape(box3.Shape());
|
||||
|
||||
aContext->Display(ais1);
|
||||
aContext->Display(ais2);
|
||||
aContext->Display(ais3);
|
||||
aContext->Display (ais1, Standard_False);
|
||||
aContext->Display (ais2, Standard_False);
|
||||
aContext->Display (ais3, Standard_False);
|
||||
|
||||
aContext->AddOrRemoveSelected(ais1);
|
||||
aContext->AddOrRemoveSelected(ais2);
|
||||
aContext->AddOrRemoveSelected(ais3);
|
||||
aContext->AddOrRemoveSelected (ais1, Standard_False);
|
||||
aContext->AddOrRemoveSelected (ais2, Standard_False);
|
||||
aContext->AddOrRemoveSelected (ais3, Standard_False);
|
||||
|
||||
di << "\n No of currents = " << aContext->NbSelected();
|
||||
|
||||
@@ -413,10 +415,12 @@ static Standard_Integer OCC138 (Draw_Interpretor& di, Standard_Integer /*argc*/
|
||||
{
|
||||
di << "\n count is = " << count++;
|
||||
Handle(AIS_InteractiveObject) ais = aContext->SelectedInteractive();
|
||||
aContext->AddOrRemoveSelected(ais);
|
||||
aContext->AddOrRemoveSelected (ais, Standard_False);
|
||||
aContext->InitSelected();
|
||||
}
|
||||
|
||||
aContext->UpdateCurrentViewer();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -576,7 +580,7 @@ static Standard_Integer OCC232 (Draw_Interpretor& di, Standard_Integer /*argc*/
|
||||
builder.Add(comp, cs2);
|
||||
|
||||
Handle(AIS_Shape) ais = new AIS_Shape(comp);
|
||||
aContext->Display(ais);
|
||||
aContext->Display (ais, Standard_False);
|
||||
|
||||
TopExp_Explorer exp(comp, TopAbs_COMPSOLID);
|
||||
while(exp.More())
|
||||
@@ -589,10 +593,13 @@ static Standard_Integer OCC232 (Draw_Interpretor& di, Standard_Integer /*argc*/
|
||||
Handle (StdSelect_ShapeTypeFilter) filt = new StdSelect_ShapeTypeFilter(TopAbs_COMPSOLID);
|
||||
aContext->AddFilter(filt);
|
||||
Standard_DISABLE_DEPRECATION_WARNINGS
|
||||
aContext->CloseAllContexts();
|
||||
aContext->CloseAllContexts (Standard_False);
|
||||
aContext->OpenLocalContext();
|
||||
aContext->ActivateStandardMode(TopAbs_SOLID);
|
||||
Standard_ENABLE_DEPRECATION_WARNINGS
|
||||
|
||||
aContext->UpdateCurrentViewer();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -612,13 +619,13 @@ static Standard_Integer OCC138LC (Draw_Interpretor& di, Standard_Integer /*argc
|
||||
Handle(AIS_InteractiveObject) ais2 = new AIS_Shape(box2.Shape());
|
||||
Handle(AIS_InteractiveObject) ais3 = new AIS_Shape(box3.Shape());
|
||||
|
||||
aContext->Display(ais1);
|
||||
aContext->Display(ais2);
|
||||
aContext->Display(ais3);
|
||||
aContext->Display (ais1, Standard_False);
|
||||
aContext->Display (ais2, Standard_False);
|
||||
aContext->Display (ais3, Standard_False);
|
||||
|
||||
aContext->AddOrRemoveSelected(ais1);
|
||||
aContext->AddOrRemoveSelected(ais2);
|
||||
aContext->AddOrRemoveSelected(ais3);
|
||||
aContext->AddOrRemoveSelected (ais1, Standard_False);
|
||||
aContext->AddOrRemoveSelected (ais2, Standard_False);
|
||||
aContext->AddOrRemoveSelected (ais3, Standard_False);
|
||||
|
||||
di << "\n No of selected = " << aContext->NbSelected();
|
||||
|
||||
@@ -629,10 +636,12 @@ static Standard_Integer OCC138LC (Draw_Interpretor& di, Standard_Integer /*argc
|
||||
{
|
||||
di << "\n count is = %d" << count++;
|
||||
Handle(AIS_InteractiveObject) ais = aContext->SelectedInteractive();
|
||||
aContext->AddOrRemoveSelected(ais);
|
||||
aContext->AddOrRemoveSelected (ais, Standard_False);
|
||||
aContext->InitSelected();
|
||||
}
|
||||
|
||||
aContext->UpdateCurrentViewer();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -934,7 +943,7 @@ static Standard_Integer OCC813 (Draw_Interpretor& di, Standard_Integer argc,cons
|
||||
if(!aContext.IsNull()) {
|
||||
Handle(AIS_Shape) aisp =
|
||||
new AIS_Shape (BRepBuilderAPI_MakeEdge(GeomAPI::To3d(curve2d, pln)).Edge());
|
||||
aContext->Display (aisp);
|
||||
aContext->Display (aisp, Standard_False);
|
||||
}
|
||||
|
||||
//This does not give any solutions.
|
||||
@@ -951,10 +960,16 @@ static Standard_Integer OCC813 (Draw_Interpretor& di, Standard_Integer argc,cons
|
||||
DrawTrSurf::Set(st,glin);
|
||||
if(!aContext.IsNull()) {
|
||||
Handle(AIS_Shape) aisp =
|
||||
new AIS_Shape (BRepBuilderAPI_MakeEdge(GeomAPI::To3d(glin, pln)).Edge()); aContext->Display (aisp);
|
||||
new AIS_Shape (BRepBuilderAPI_MakeEdge(GeomAPI::To3d(glin, pln)).Edge());
|
||||
aContext->Display (aisp, Standard_False);
|
||||
}
|
||||
}
|
||||
|
||||
if (!aContext.IsNull())
|
||||
{
|
||||
aContext->UpdateCurrentViewer();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -995,12 +1010,12 @@ static Standard_Integer OCC814 (Draw_Interpretor& di, Standard_Integer argc,cons
|
||||
if(!aContext.IsNull()) {
|
||||
Handle(AIS_Shape) aisp =
|
||||
new AIS_Shape (BRepBuilderAPI_MakeEdge(GeomAPI::To3d(curve2d, pln)).Edge());
|
||||
aContext->Display (aisp);
|
||||
aContext->Display (aisp, Standard_False);
|
||||
}
|
||||
if(!aContext.IsNull()) {
|
||||
Handle(AIS_Shape) aisp =
|
||||
new AIS_Shape (BRepBuilderAPI_MakeEdge(GeomAPI::To3d(fromcurve2d, pln)).Edge());
|
||||
aContext->Display (aisp);
|
||||
aContext->Display (aisp, Standard_False);
|
||||
}
|
||||
|
||||
Geom2dAdaptor_Curve acur(curve2d), afromcur(fromcurve2d);
|
||||
@@ -1022,10 +1037,16 @@ static Standard_Integer OCC814 (Draw_Interpretor& di, Standard_Integer argc,cons
|
||||
DrawTrSurf::Set(st,glin);
|
||||
if(!aContext.IsNull()) {
|
||||
Handle(AIS_Shape) aisp =
|
||||
new AIS_Shape (BRepBuilderAPI_MakeEdge(GeomAPI::To3d(glin, pln)).Edge()); aContext->Display (aisp);
|
||||
new AIS_Shape (BRepBuilderAPI_MakeEdge(GeomAPI::To3d(glin, pln)).Edge());
|
||||
aContext->Display (aisp, Standard_False);
|
||||
}
|
||||
}
|
||||
|
||||
if (!aContext.IsNull())
|
||||
{
|
||||
aContext->UpdateCurrentViewer();
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1254,7 +1275,7 @@ static Standard_Integer OCC1174_1 (Draw_Interpretor& di, Standard_Integer argc,
|
||||
|
||||
aDrawer->SetShadingAspect (aShadingAspect);
|
||||
|
||||
anAISContext->Display(anAisIO, 1, 0);
|
||||
anAISContext->Display (anAisIO, 1, 0, Standard_True);
|
||||
|
||||
Standard_Real r, g, b;
|
||||
aShadingAspect->Color(Aspect_TOFM_FRONT_SIDE).Values(r,g,b, Quantity_TOC_RGB);
|
||||
@@ -1287,8 +1308,8 @@ static Standard_Integer OCC1174_2 (Draw_Interpretor& di, Standard_Integer argc,
|
||||
TopoDS_Shape sh = DBRep::Get(argv[1]);
|
||||
|
||||
Handle(AIS_Shape) ais = new AIS_Shape(sh);
|
||||
AISContext->Display(ais,1,0);
|
||||
AISContext->SetMaterial(ais,Graphic3d_NOM_SHINY_PLASTIC);
|
||||
AISContext->Display (ais, 1, 0, Standard_False);
|
||||
AISContext->SetMaterial (ais, Graphic3d_NOM_SHINY_PLASTIC, Standard_False);
|
||||
|
||||
Quantity_Color colf(0.0, 0.4, 0.0, Quantity_TOC_RGB);
|
||||
Quantity_Color colb(0.0, 0.0, 0.6, Quantity_TOC_RGB);
|
||||
@@ -1310,7 +1331,7 @@ static Standard_Integer OCC1174_2 (Draw_Interpretor& di, Standard_Integer argc,
|
||||
back.SetTransparency(0.2);
|
||||
sa->SetMaterial(back,Aspect_TOFM_BACK_SIDE);
|
||||
|
||||
AISContext->Redisplay(ais,1,0);
|
||||
AISContext->Redisplay (ais, 1, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -1471,7 +1492,7 @@ static Standard_Integer OCC2569 (Draw_Interpretor& di, Standard_Integer argc, co
|
||||
}
|
||||
TopoDS_Edge sh = BRepBuilderAPI_MakeEdge(bez).Edge();
|
||||
Handle(AIS_Shape) ais = new AIS_Shape(sh);
|
||||
aContext->Display(ais);
|
||||
aContext->Display (ais, Standard_True);
|
||||
DrawTrSurf::Set(argv[2],bez);
|
||||
return 0;
|
||||
}
|
||||
|
@@ -1285,8 +1285,8 @@ static Standard_Integer OCC24012 (Draw_Interpretor& di, Standard_Integer argc, c
|
||||
{
|
||||
TopoDS_Shape rshape = anormpro.Projection();
|
||||
Handle(AIS_InteractiveObject) myShape = new AIS_Shape (rshape);
|
||||
myAISContext->SetColor(myShape, Quantity_Color(Quantity_NOC_YELLOW));
|
||||
myAISContext->Display(myShape, Standard_True);
|
||||
myAISContext->SetColor (myShape, Quantity_Color(Quantity_NOC_YELLOW), Standard_False);
|
||||
myAISContext->Display (myShape, Standard_True);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -1845,7 +1845,7 @@ static Standard_Integer OCC24622 (Draw_Interpretor& /*theDi*/, Standard_Integer
|
||||
|
||||
Handle(AIS_TexturedShape) aTexturedShape = new AIS_TexturedShape (aBlankShape);
|
||||
aTexturedShape->SetTexturePixMap (anImage);
|
||||
anAISContext->Display (aTexturedShape, 3, 0);
|
||||
anAISContext->Display (aTexturedShape, 3, 0, Standard_True);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -3304,7 +3304,7 @@ static Standard_Integer OCC26172 (Draw_Interpretor& theDI, Standard_Integer theA
|
||||
BRepBuilderAPI_MakeEdge anEdgeBuilder (aStart, anEnd);
|
||||
TopoDS_Edge anEdge = anEdgeBuilder.Edge();
|
||||
Handle(AIS_Shape) aTestAISShape = new AIS_Shape (anEdge);
|
||||
anAISContext->Display (aTestAISShape);
|
||||
anAISContext->Display (aTestAISShape, Standard_True);
|
||||
|
||||
// 2. activate it in selection modes
|
||||
TColStd_SequenceOfInteger aModes;
|
||||
@@ -3398,16 +3398,17 @@ static Standard_Integer OCC26284 (Draw_Interpretor& theDI, Standard_Integer theA
|
||||
|
||||
BRepPrimAPI_MakeSphere aSphereBuilder (gp_Pnt (0.0, 0.0, 0.0), 1.0);
|
||||
Handle(AIS_Shape) aSphere = new AIS_Shape (aSphereBuilder.Shape());
|
||||
anAISContext->Display (aSphere);
|
||||
anAISContext->Display (aSphere, Standard_False);
|
||||
for (Standard_Integer aChildIdx = 0; aChildIdx < 5; ++aChildIdx)
|
||||
{
|
||||
BRepPrimAPI_MakeSphere aBuilder (gp_Pnt (1.0 + aChildIdx, 1.0 + aChildIdx, 1.0 + aChildIdx), 1.0);
|
||||
Handle(AIS_Shape) aChild = new AIS_Shape (aBuilder.Shape());
|
||||
aSphere->AddChild (aChild);
|
||||
anAISContext->Display (aChild);
|
||||
anAISContext->Display (aChild, Standard_False);
|
||||
}
|
||||
|
||||
anAISContext->RecomputeSelectionOnly (aSphere);
|
||||
anAISContext->UpdateCurrentViewer();
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -4170,16 +4171,16 @@ static Standard_Integer OCC26462 (Draw_Interpretor& theDI, Standard_Integer /*th
|
||||
Handle(AIS_InteractiveObject) aBox2 = new AIS_Shape (aBuilder2.Shape());
|
||||
|
||||
const Handle(AIS_InteractiveContext) aCtx = ViewerTest::GetAISContext();
|
||||
aCtx->Display (aBox1, 0, 2);
|
||||
aCtx->Display (aBox2, 0, 2);
|
||||
aCtx->Display (aBox1, 0, 2, Standard_False);
|
||||
aCtx->Display (aBox2, 0, 2, Standard_False);
|
||||
ViewerTest::CurrentView()->FitAll();
|
||||
aCtx->SetWidth (aBox1, 3);
|
||||
aCtx->SetWidth (aBox2, 3);
|
||||
aCtx->SetWidth (aBox1, 3, Standard_False);
|
||||
aCtx->SetWidth (aBox2, 3, Standard_False);
|
||||
|
||||
aCtx->MoveTo (305, 322, ViewerTest::CurrentView());
|
||||
aCtx->ShiftSelect();
|
||||
aCtx->MoveTo (103, 322, ViewerTest::CurrentView());
|
||||
aCtx->ShiftSelect();
|
||||
aCtx->MoveTo (305, 322, ViewerTest::CurrentView(), Standard_False);
|
||||
aCtx->ShiftSelect (Standard_False);
|
||||
aCtx->MoveTo (103, 322, ViewerTest::CurrentView(), Standard_False);
|
||||
aCtx->ShiftSelect (Standard_False);
|
||||
if (aCtx->NbSelected() != 0)
|
||||
{
|
||||
theDI << "ERROR: no boxes must be selected!\n";
|
||||
@@ -4188,15 +4189,15 @@ static Standard_Integer OCC26462 (Draw_Interpretor& theDI, Standard_Integer /*th
|
||||
|
||||
aCtx->SetSelectionSensitivity (aBox1, 2, 5);
|
||||
|
||||
aCtx->MoveTo (305, 322, ViewerTest::CurrentView());
|
||||
aCtx->ShiftSelect();
|
||||
aCtx->MoveTo (305, 322, ViewerTest::CurrentView(), Standard_False);
|
||||
aCtx->ShiftSelect (Standard_False);
|
||||
if (aCtx->NbSelected() != 1)
|
||||
{
|
||||
theDI << "ERROR: b1 was not selected\n";
|
||||
return 1;
|
||||
}
|
||||
aCtx->MoveTo (103, 322, ViewerTest::CurrentView());
|
||||
aCtx->ShiftSelect();
|
||||
aCtx->MoveTo (103, 322, ViewerTest::CurrentView(), Standard_False);
|
||||
aCtx->ShiftSelect (Standard_True);
|
||||
if (aCtx->NbSelected() != 1)
|
||||
{
|
||||
theDI << "ERROR: b2 is selected after b1's tolerance increased\n";
|
||||
@@ -4885,8 +4886,8 @@ static Standard_Integer BUC26658 (Draw_Interpretor& theDI,
|
||||
Standard_Integer Xp,Yp;
|
||||
myV3dView->Convert(Xv,Yv,Xp,Yp);
|
||||
|
||||
aContext->MoveTo(Xp,Yp, myV3dView);
|
||||
aContext->Select();
|
||||
aContext->MoveTo (Xp, Yp, myV3dView, Standard_False);
|
||||
aContext->Select (Standard_False);
|
||||
bool aHasSelected = false;
|
||||
for (aContext->InitSelected(); aContext->MoreSelected() && !aHasSelected; aContext->NextSelected()) {
|
||||
Handle(AIS_InteractiveObject) anIO = aContext->SelectedInteractive();
|
||||
@@ -4912,7 +4913,7 @@ static Standard_Integer BUC26658 (Draw_Interpretor& theDI,
|
||||
Standard_ENABLE_DEPRECATION_WARNINGS
|
||||
|
||||
// check that there are no selected vertices
|
||||
aContext->Select();
|
||||
aContext->Select (Standard_True);
|
||||
aHasSelected = false;
|
||||
for (aContext->InitSelected(); aContext->MoreSelected() && !aHasSelected; aContext->NextSelected()) {
|
||||
Handle(AIS_InteractiveObject) anIO = aContext->SelectedInteractive();
|
||||
@@ -5149,7 +5150,7 @@ static Standard_Integer OCC27523 (Draw_Interpretor& theDI, Standard_Integer theA
|
||||
BRepBuilderAPI_MakeEdge anEdgeBuilder (aStart, anEnd);
|
||||
TopoDS_Edge anEdge = anEdgeBuilder.Edge();
|
||||
Handle(AIS_InteractiveObject) aTestAISShape = new AIS_Shape (anEdge);
|
||||
anAISContext->Display (aTestAISShape);
|
||||
anAISContext->Display (aTestAISShape, Standard_False);
|
||||
|
||||
// activate it in selection modes
|
||||
TColStd_SequenceOfInteger aModes;
|
||||
@@ -5171,7 +5172,7 @@ static Standard_Integer OCC27523 (Draw_Interpretor& theDI, Standard_Integer theA
|
||||
Handle(AIS_Shape)::DownCast (aTestAISShape)->Set (aVertexShape);
|
||||
aTestAISShape->Redisplay();
|
||||
|
||||
anAISContext->AddOrRemoveSelected (aTestAISShape);
|
||||
anAISContext->AddOrRemoveSelected (aTestAISShape, Standard_True);
|
||||
|
||||
bool aValidShapeType = false;
|
||||
for (anAISContext->InitSelected(); anAISContext->MoreSelected(); anAISContext->NextSelected())
|
||||
@@ -5252,7 +5253,7 @@ static Standard_Integer OCC27700 (Draw_Interpretor& /*theDI*/, Standard_Integer
|
||||
return 1;
|
||||
}
|
||||
Handle(OCC27700_Text) aPresentation = new OCC27700_Text();
|
||||
aContext->Display (aPresentation);
|
||||
aContext->Display (aPresentation, Standard_True);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@@ -244,7 +244,7 @@ static Standard_Integer BUC60632(Draw_Interpretor& di, Standard_Integer /*n*/, c
|
||||
di << "use 'vinit' command before " << a[0] << "\n";
|
||||
return -1;
|
||||
}
|
||||
myAIScontext->EraseAll();
|
||||
myAIScontext->EraseAll (Standard_False);
|
||||
|
||||
TopoDS_Vertex V1 = BRepBuilderAPI_MakeVertex(gp_Pnt(0,0,0));
|
||||
TopoDS_Vertex V2 = BRepBuilderAPI_MakeVertex(gp_Pnt(10,10,0));
|
||||
@@ -252,8 +252,8 @@ static Standard_Integer BUC60632(Draw_Interpretor& di, Standard_Integer /*n*/, c
|
||||
Handle(AIS_Shape) Ve1 = new AIS_Shape(V1);
|
||||
Handle(AIS_Shape) Ve2 = new AIS_Shape(V2);
|
||||
|
||||
myAIScontext->Display(Ve1);
|
||||
myAIScontext->Display(Ve2);
|
||||
myAIScontext->Display (Ve1, Standard_False);
|
||||
myAIScontext->Display (Ve2, Standard_False);
|
||||
|
||||
Handle(Geom_Plane) Plane1 = new Geom_Plane(gp_Pnt(0,0,0),gp_Dir(0,0,1));
|
||||
TCollection_ExtendedString Ext1("Dim1");
|
||||
@@ -268,8 +268,8 @@ static Standard_Integer BUC60632(Draw_Interpretor& di, Standard_Integer /*n*/, c
|
||||
anAspect->ArrowAspect()->SetLength (1.0);
|
||||
Dim1->SetDimensionAspect (anAspect);
|
||||
|
||||
myAIScontext->SetDisplayMode(Dim1, Draw::Atoi(a[1]));
|
||||
myAIScontext->Display(Dim1);
|
||||
myAIScontext->SetDisplayMode (Dim1, Draw::Atoi(a[1]), Standard_False);
|
||||
myAIScontext->Display (Dim1, Standard_True);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -553,8 +553,8 @@ static Standard_Integer BUC60792(Draw_Interpretor& di, Standard_Integer /*argc*/
|
||||
Handle(Geom2d_Curve) gcir1 = GeomAPI::To2d(gcir, pln->Pln());
|
||||
TopoDS_Shape sh1 = BRepBuilderAPI_MakeEdge(gcir1, pln).Shape();
|
||||
Handle(AIS_Shape) ais1 = new AIS_Shape(sh1);
|
||||
aContext->SetColor(ais1, Quantity_NOC_INDIANRED);
|
||||
aContext->Display(ais1);
|
||||
aContext->SetColor (ais1, Quantity_NOC_INDIANRED, Standard_False);
|
||||
aContext->Display (ais1, Standard_False);
|
||||
DBRep::Set("sh0",sh1);
|
||||
gp_Pnt2d thepoint;
|
||||
// local_get_2Dpointfrom3Dpoint(pt3d, pln->Pln(), thepoint);
|
||||
@@ -575,10 +575,10 @@ static Standard_Integer BUC60792(Draw_Interpretor& di, Standard_Integer /*argc*/
|
||||
DBRep::Set(aStr,sh);
|
||||
Handle(AIS_Shape) ais = new AIS_Shape(sh);
|
||||
if( i ==1 )
|
||||
aContext->SetColor(ais, Quantity_NOC_GREEN);
|
||||
aContext->SetColor (ais, Quantity_NOC_GREEN, Standard_False);
|
||||
if( i == 2)
|
||||
aContext->SetColor(ais, Quantity_NOC_HOTPINK);
|
||||
aContext->Display(ais);
|
||||
aContext->SetColor (ais, Quantity_NOC_HOTPINK, Standard_False);
|
||||
aContext->Display (ais, Standard_False);
|
||||
Standard_Real ParSol1, ParSol2, ParArg1, ParArg2;
|
||||
gp_Pnt2d PntSol1, PntSol2;
|
||||
cirtanrad.Tangency1(i, ParSol1, ParArg1, PntSol1);
|
||||
@@ -587,6 +587,7 @@ static Standard_Integer BUC60792(Draw_Interpretor& di, Standard_Integer /*argc*/
|
||||
printf("%f\t%f\t\t%f\t%f\n",ParSol2, ParArg2,PntSol2.X(),PntSol2.Y());
|
||||
}
|
||||
}
|
||||
aContext->UpdateCurrentViewer();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -646,7 +647,7 @@ static Standard_Integer BUC60811(Draw_Interpretor& di, Standard_Integer argc, co
|
||||
ais1 = new AIS_Shape(F1);
|
||||
DBRep::Set("F1",F1);
|
||||
aContext->SetMaterial(ais1,Graphic3d_NOM_ALUMINIUM,Standard_False);
|
||||
aContext->Display(ais1);
|
||||
aContext->Display (ais1, Standard_False);
|
||||
BRep_Builder B;
|
||||
TopoDS_Shell shell;
|
||||
B.MakeShell(shell);
|
||||
@@ -683,7 +684,7 @@ static Standard_Integer BUC60811(Draw_Interpretor& di, Standard_Integer argc, co
|
||||
FP = BRepBuilderAPI_MakeFace(mkw.Wire());
|
||||
ais2 = new AIS_Shape( FP );
|
||||
aContext->SetMaterial(ais2,Graphic3d_NOM_ALUMINIUM,Standard_False);
|
||||
aContext->Display( ais2 );
|
||||
aContext->Display (ais2, Standard_False);
|
||||
|
||||
DBRep::Set("FP",FP);
|
||||
|
||||
@@ -693,7 +694,7 @@ static Standard_Integer BUC60811(Draw_Interpretor& di, Standard_Integer argc, co
|
||||
BRepBuilderAPI_MakeFace bzf2( offsurf, Precision::Confusion() );
|
||||
TopoDS_Face F2= bzf2.Face();
|
||||
Handle(AIS_Shape) ais22 = new AIS_Shape(F2);
|
||||
aContext->Display(ais22);
|
||||
aContext->Display (ais22, Standard_False);
|
||||
DBRep::Set("F2",F2);
|
||||
|
||||
//step 3. filleting the patch.
|
||||
@@ -714,7 +715,7 @@ static Standard_Integer BUC60811(Draw_Interpretor& di, Standard_Integer argc, co
|
||||
FP1 = fillet.Shape();
|
||||
ais2 = new AIS_Shape( FP1 );
|
||||
aContext->SetMaterial(ais2,Graphic3d_NOM_ALUMINIUM,Standard_False);
|
||||
aContext->Display( ais2 );
|
||||
aContext->Display (ais2, Standard_False);
|
||||
|
||||
DBRep::Set("FP1",FP1);
|
||||
|
||||
@@ -732,7 +733,7 @@ static Standard_Integer BUC60811(Draw_Interpretor& di, Standard_Integer argc, co
|
||||
myWire->Add((BRepBuilderAPI_MakeEdge(projCurve)).Edge());
|
||||
}
|
||||
Handle(AIS_Shape) ais33 = new AIS_Shape( myWire->Wire() );
|
||||
aContext->Display(ais33);
|
||||
aContext->Display (ais33, Standard_True);
|
||||
|
||||
DBRep::Set("Wire",myWire->Wire());
|
||||
|
||||
@@ -859,14 +860,14 @@ static Standard_Integer BUC60856(Draw_Interpretor& di, Standard_Integer /*argc*/
|
||||
Handle(Geom_RectangularTrimmedSurface) S = GC_MakeTrimmedCone (P1, P2, R1, R2).Value();
|
||||
TopoDS_Shape myshape = BRepBuilderAPI_MakeFace(S, Precision::Confusion()).Shape();
|
||||
Handle(AIS_Shape) ais1 = new AIS_Shape(myshape);
|
||||
aContext->Display(ais1);
|
||||
aContext->SetColor(ais1, Quantity_NOC_BLUE1);
|
||||
aContext->Display (ais1, Standard_False);
|
||||
aContext->SetColor (ais1, Quantity_NOC_BLUE1, Standard_False);
|
||||
|
||||
Handle(Geom_RectangularTrimmedSurface) S2 = GC_MakeTrimmedCone (P1, P2,R1, 0).Value();
|
||||
TopoDS_Shape myshape2 = BRepBuilderAPI_MakeFace(S2, Precision::Confusion()).Shape();
|
||||
Handle(AIS_Shape) ais2 = new AIS_Shape(myshape2);
|
||||
aContext->Display(ais2);
|
||||
aContext->SetColor(ais2, Quantity_NOC_RED);
|
||||
aContext->Display (ais2, Standard_False);
|
||||
aContext->SetColor (ais2, Quantity_NOC_RED, Standard_False);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -956,7 +957,7 @@ static Standard_Integer BUC60876_ (Draw_Interpretor& di,
|
||||
Handle(AIS_InteractiveObject) anIO = new AIS_Shape(aShape);
|
||||
// Handle(AIS_InteractiveObject) anIOa = ViewerTest::GetAISShapeFromName(argv[1]);
|
||||
anIO->SetHilightMode((argc == 3) ? Draw::Atoi(argv[2]) : 1);
|
||||
aContext->Display(anIO);
|
||||
aContext->Display (anIO, Standard_True);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1705,7 +1706,7 @@ static Standard_Integer BUC60951_(Draw_Interpretor& di, Standard_Integer argc, c
|
||||
}
|
||||
|
||||
Handle(AIS_Shape) res = new AIS_Shape(sh);
|
||||
myContext->Display( res );
|
||||
myContext->Display (res, Standard_True);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@@ -63,7 +63,7 @@ static Standard_Integer BUC60738 (Draw_Interpretor& di, Standard_Integer /*argc*
|
||||
theDrawer->SetShadingAspect(theShadingAspect);
|
||||
theAISShape->SetAttributes(theDrawer);
|
||||
|
||||
aContext->Display(theAISShape);
|
||||
aContext->Display (theAISShape, Standard_True);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@@ -66,9 +66,9 @@ static Standard_Integer OCC172 (Draw_Interpretor& di, Standard_Integer /*argc*/
|
||||
AIS_ListIteratorOfListOfInteractive It;
|
||||
for (It.Initialize(aListOfIO);It.More();It.Next())
|
||||
{
|
||||
aContext->AddOrRemoveSelected(It.Value());
|
||||
aContext->AddOrRemoveSelected (It.Value(), Standard_False);
|
||||
}
|
||||
|
||||
aContext->UpdateCurrentViewer();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -99,13 +99,15 @@ static Standard_Integer OCC204 (Draw_Interpretor& di, Standard_Integer argc, co
|
||||
Handle(AIS_InteractiveObject) ais2 = new AIS_Shape(box2.Shape());
|
||||
Handle(AIS_InteractiveObject) ais3 = new AIS_Shape(box3.Shape());
|
||||
|
||||
aContext->Display(ais1);
|
||||
aContext->Display(ais2);
|
||||
aContext->Display(ais3);
|
||||
aContext->Display (ais1, Standard_False);
|
||||
aContext->Display (ais2, Standard_False);
|
||||
aContext->Display (ais3, Standard_False);
|
||||
|
||||
aContext->AddOrRemoveSelected(ais1);
|
||||
aContext->AddOrRemoveSelected(ais2);
|
||||
aContext->AddOrRemoveSelected(ais3);
|
||||
aContext->AddOrRemoveSelected (ais1, Standard_False);
|
||||
aContext->AddOrRemoveSelected (ais2, Standard_False);
|
||||
aContext->AddOrRemoveSelected (ais3, Standard_False);
|
||||
|
||||
aContext->UpdateCurrentViewer();
|
||||
|
||||
//printf("\n No of currents = %d", aContext->NbCurrents());
|
||||
|
||||
|
@@ -46,22 +46,22 @@ static Standard_Integer BUC60857 (Draw_Interpretor& di, Standard_Integer /*argc*
|
||||
TopoDS_Shape myshape = BRepBuilderAPI_MakeFace(S, Precision::Confusion()).Shape();
|
||||
DBRep::Set("BUC60857_BLUE",myshape);
|
||||
Handle(AIS_Shape) ais1 = new AIS_Shape(myshape);
|
||||
aContext->Display(ais1);
|
||||
aContext->SetColor(ais1, Quantity_NOC_BLUE1);
|
||||
aContext->Display (ais1, Standard_False);
|
||||
aContext->SetColor (ais1, Quantity_NOC_BLUE1, Standard_False);
|
||||
|
||||
Handle(Geom_RectangularTrimmedSurface) S2 = GC_MakeTrimmedCone (P1, P2, R1, 0).Value();
|
||||
TopoDS_Shape myshape2 = BRepBuilderAPI_MakeFace(S2, Precision::Confusion()).Shape();
|
||||
DBRep::Set("BUC60857_RED",myshape2);
|
||||
Handle(AIS_Shape) ais2 = new AIS_Shape(myshape2);
|
||||
aContext->Display(ais2);
|
||||
aContext->SetColor(ais2, Quantity_NOC_RED);
|
||||
aContext->Display (ais2, Standard_False);
|
||||
aContext->SetColor (ais2, Quantity_NOC_RED, Standard_False);
|
||||
|
||||
Handle(Geom_RectangularTrimmedSurface) S3 = GC_MakeTrimmedCone (P1, P2, R2, R1).Value();
|
||||
TopoDS_Shape myshape3 = BRepBuilderAPI_MakeFace(S3, Precision::Confusion()).Shape();
|
||||
DBRep::Set("BUC60857_GREEN",myshape3);
|
||||
Handle(AIS_Shape) ais3 = new AIS_Shape(myshape3);
|
||||
aContext->Display(ais3);
|
||||
aContext->SetColor(ais3, Quantity_NOC_GREEN);
|
||||
aContext->Display (ais3, Standard_False);
|
||||
aContext->SetColor (ais3, Quantity_NOC_GREEN, Standard_True);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user