1 // Created on: 2002-03-19
2 // Created by: QA Admin
3 // Copyright (c) 2002-2014 OPEN CASCADE SAS
5 // This file is part of Open CASCADE Technology software library.
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
18 #include <Draw_Interpretor.hxx>
20 #include <DrawTrSurf.hxx>
21 #include <AIS_InteractiveContext.hxx>
22 #include <ViewerTest.hxx>
23 #include <AIS_Shape.hxx>
24 #include <TopoDS_Shape.hxx>
26 #include <BRepPrimAPI_MakeSphere.hxx>
27 #include <Graphic3d_AspectFillArea3d.hxx>
28 #include <Prs3d_Drawer.hxx>
29 #include <Prs3d_ShadingAspect.hxx>
31 //#include <AcisData_AcisModel.hxx>
32 #include <TopTools_HSequenceOfShape.hxx>
34 static Standard_Integer BUC60738 (Draw_Interpretor& di, Standard_Integer /*argc*/, const char ** argv)
37 Handle(AIS_InteractiveContext) aContext = ViewerTest::GetAISContext();
38 if(aContext.IsNull()) {
39 di << "use 'vinit' command before " << argv[0] << "\n";
43 TopoDS_Shape theSphere = BRepPrimAPI_MakeSphere(gp_Pnt(-40,0,0),20).Shape();
44 Handle(AIS_Shape) theAISShape = new AIS_Shape(theSphere);
46 //display mode = Shading
47 theAISShape->SetDisplayMode(1);
50 Handle(Prs3d_Drawer) theDrawer = theAISShape->Attributes();
51 Handle(Prs3d_ShadingAspect) theShadingAspect = theDrawer->ShadingAspect();
52 Handle(Graphic3d_AspectFillArea3d) theAspectFillArea3d = theShadingAspect->Aspect();
54 //allow to display the edges
55 theAspectFillArea3d->SetEdgeOn();
56 //set the style to Dash
58 //but the style is not set to dash : it is always solid
59 theAspectFillArea3d->SetEdgeLineType (Aspect_TOL_DASH);
60 theAspectFillArea3d->SetEdgeColor(Quantity_Color(Quantity_NOC_GREEN));
61 theAspectFillArea3d->SetInteriorStyle(Aspect_IS_EMPTY);
62 theShadingAspect->SetAspect(theAspectFillArea3d);
63 theDrawer->SetShadingAspect(theShadingAspect);
64 theAISShape->SetAttributes(theDrawer);
66 aContext->Display(theAISShape);
71 void QABugs::Commands_4(Draw_Interpretor& theCommands) {
72 const char *group = "QABugs";
74 theCommands.Add("BUC60738","BUC60738",__FILE__,BUC60738,group);