0026885: Visualization - drop redundant aspects from structure level
[occt.git] / src / V3d / V3d.cxx
index 8e385ff..baf29aa 100644 (file)
@@ -232,109 +232,3 @@ void V3d::SwitchViewsinWindow(const Handle(V3d_View)& aPreviousView,
   aNextView->Viewer()->SetViewOn(aNextView);
     
 }
-void V3d::DrawSphere(const Handle(V3d_Viewer)& aViewer,const Quantity_Length ray)
-{
-  const Standard_Boolean inf = ray < 0;
-  const Standard_Real aRadius = Standard_ShortReal(Abs(ray));
-  Handle(Graphic3d_Structure) Struct = new Graphic3d_Structure(aViewer->StructureManager());
-  Handle(Graphic3d_Group)     Group  = Struct->NewGroup();
-
-  Handle(Graphic3d_AspectLine3d) LineAttrib = new Graphic3d_AspectLine3d() ;
-  LineAttrib->SetColor(Quantity_Color(Quantity_NOC_YELLOW));
-  Struct->SetPrimitivesAspect(LineAttrib) ;
-
-  const Standard_Integer NFACES = 30;
-  Handle(Graphic3d_ArrayOfPolylines) aPrims = new Graphic3d_ArrayOfPolylines(NFACES*(NFACES+1),NFACES);
-
-  const Standard_Real Dbeta = 2. * M_PI / NFACES;
-  const Standard_Real Dalpha = 2. * M_PI / NFACES;
-  Standard_ShortReal X,Y,Z,X0 = 0.,Y0 = 0.,Z0 = 0.;
-  Standard_Real R, Alpha, Beta = 0.;
-  Standard_Integer i,j ;
-  for( j=0; j<NFACES/2 ; j++, Beta += Dbeta ) {
-    aPrims->AddBound(NFACES+1);
-    R = aRadius*sin(Beta);
-    Z = Standard_ShortReal(aRadius*cos(Beta));
-    for( i=0, Alpha = 0.; i<NFACES; i++, Alpha += Dalpha ) {
-      X = Standard_ShortReal(R*cos(Alpha));
-      Y = Standard_ShortReal(R*sin(Alpha));
-      aPrims->AddVertex(X,Y,Z);
-      if (i==0) { X0=X, Y0=Y, Z0=Z; }
-    }
-    aPrims->AddVertex(X0,Y0,Z0);
-  }
-  for( j=0; j<NFACES/2 ; j++, Beta += Dbeta ) {
-    aPrims->AddBound(NFACES+1);
-    R = aRadius*sin(Beta);
-    Y = Standard_ShortReal(aRadius*cos(Beta));
-    Beta += Dbeta ;
-    for( i=0, Alpha = 0.; i<NFACES; i++, Alpha += Dalpha ) {
-      X = Standard_ShortReal(R*cos(Alpha));
-      Z = Standard_ShortReal(R*sin(Alpha));
-      aPrims->AddVertex(X,Y,Z);
-      if (i==0) { X0=X, Y0=Y, Z0=Z; }
-    }
-    aPrims->AddVertex(X0,Y0,Z0);
-  }
-  Group->AddPrimitiveArray(aPrims);
-  if(inf) Struct->SetInfiniteState(Standard_True);
-  Struct->Display();
-  aViewer->Update();
-}
-
-void V3d::SetPlane(const Handle(V3d_Viewer)& aViewer, 
-                   const Standard_Real x1,
-                   const Standard_Real y1,
-                   const Standard_Real z1,
-                   const Standard_Real x2,
-                   const Standard_Real y2,
-                   const Standard_Real z2) {
-
-  gp_Ax3 a(gp_Pnt(0.,0.,0),gp_Dir(x1,y1,z1),gp_Dir(x2,y2,z2));
-  aViewer->SetPrivilegedPlane(a);
-
-}
-void V3d::PickGrid(const Handle(V3d_Viewer)& aViewer,
-//                                const Quantity_Length ray) {
-                                const Quantity_Length ) {
-Standard_Real x1, y1, z1;
-Standard_Real x2, y2, z2;
-        cout << "Direction ? " << flush;
-        cin >> x1; cin >> y1; cin >> z1;
-        cout << "XDirection ? " << flush;
-        cin >> x2; cin >> y2; cin >> z2;
-Standard_Integer u, v;
-        cout << "u, v ? " << flush;
-        cin >> u; cin >> v;
-        V3d::SetPlane (aViewer, x1, y1, z1, x2, y2, z2);
-
-        // To restart the calculation on the new plane
-        if (aViewer->Grid ()->IsActive ()) {
-                Standard_Real xo, yo;
-                Quantity_PlaneAngle angle;
-                switch (aViewer->GridType ()) {
-                        case Aspect_GT_Rectangular :
-                                Standard_Real xstep, ystep;
-                                aViewer->RectangularGridValues
-                                        (xo, yo, xstep, ystep, angle);
-                                aViewer->SetRectangularGridValues
-                                        (xo, yo, xstep, ystep, angle);
-                        break;
-                        case Aspect_GT_Circular :
-                                Standard_Real radiusstep;
-                                Standard_Integer division;
-                                aViewer->CircularGridValues
-                                        (xo, yo, radiusstep, division, angle);
-                                aViewer->SetCircularGridValues
-                                        (xo, yo, radiusstep, division, angle);
-                        break;
-                }
-        }
-
-        for (aViewer->InitActiveViews ();
-                aViewer->MoreActiveViews ();
-                   aViewer->NextActiveViews()) {
-Standard_Real X, Y, Z;
-                aViewer->ActiveView ()->Convert (u, v, X, Y, Z);
-        }
-}