-
Notifications
You must be signed in to change notification settings - Fork 0
/
DocumentTut.cxx
36 lines (28 loc) · 943 Bytes
/
DocumentTut.cxx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#include "DocumentTut.h"
#include <QFileDialog>
#include <QMessageBox>
#include <QApplication>
#include <TopoDS_Shape.hxx>
#include <AIS_Shape.hxx>
TopoDS_Shape
MakeBottle(const Standard_Real myWidth , const Standard_Real myHeight , const Standard_Real myThickness);
DocumentTut::DocumentTut( const int theIndex, ApplicationCommonWindow* app )
: DocumentCommon( theIndex, app )
{
}
DocumentTut::~DocumentTut()
{
}
void DocumentTut::onMakeBottle()
{
QApplication::setOverrideCursor( Qt::WaitCursor );
TopoDS_Shape aBottle=MakeBottle(50,70,30);
Handle(AIS_Shape) AISBottle=new AIS_Shape(aBottle);
getContext()->SetMaterial(AISBottle,Graphic3d_NOM_GOLD);
getContext()->SetDisplayMode(AISBottle,1,Standard_False);
getContext()->Display(AISBottle, Standard_False);
getContext()->SetCurrentObject(AISBottle,Standard_False);
emit selectionChanged();
fitAll();
QApplication::restoreOverrideCursor();
}