mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-05-01 10:26:12 +03:00
Enumeration values have been renamed to use complete prefix Graphic3d_NOM_ -> Graphic3d_NameOfMaterial_ and to match string names (with old values preserved as aliases).
40 lines
1.1 KiB
C++
Executable File
40 lines
1.1 KiB
C++
Executable File
#include "DocumentTut.h"
|
|
|
|
#include <Standard_WarningsDisable.hxx>
|
|
#include <QFileDialog>
|
|
#include <QMessageBox>
|
|
#include <QApplication>
|
|
#include <Standard_WarningsRestore.hxx>
|
|
|
|
#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_NameOfMaterial_Gold, Standard_False);
|
|
getContext()->SetDisplayMode(AISBottle, 1, Standard_False);
|
|
getContext()->Display(AISBottle, Standard_False);
|
|
const Handle(AIS_InteractiveObject)& anIOAISBottle = AISBottle;
|
|
getContext()->SetSelected(anIOAISBottle,Standard_False);
|
|
emit selectionChanged();
|
|
fitAll();
|
|
QApplication::restoreOverrideCursor();
|
|
}
|
|
|
|
|