My favorites | Sign in
Project Home Downloads Source
Checkout   Browse   Changes    
 
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
35
36
37
38
39
40
41
42
43
44
45
#include <CtrlLib/CtrlLib.h>
using namespace Upp;

#include "OCETest.h"
#include "MakeBottle.h"

#include <AIS_Shape.hxx>

INITBLOCK {

#ifdef PLATFORM_POSIX
setenv("MMGT_OPT", "0", 1);
setenv("MMGT_CLEAR", "0", 1);
#else
SetEnvironmentVariable("MMGT_OPT", "0");
SetEnvironmentVariable("MMGT_CLEAR", "0");

#endif
}
GUI_APP_MAIN
{
TopWindow win;
win.LeftPos(200, 800);
win.TopPos(200, 400);

CascadeDocument Document;

CascadeView View(&Document);

win.Add(View.HSizePos(10, 10).VSizePos(10, 10));
win.Sizeable().Zoomable();

win.Open();

TopoDS_Shape aBottle = ::MakeBottle(50,70,30);
Handle(AIS_Shape) AISBottle=new AIS_Shape(aBottle);
Document.GetContext()->SetMaterial(AISBottle,Graphic3d_NOM_GOLD);
Document.GetContext()->SetDisplayMode(AISBottle,1,Standard_False);
Document.GetContext()->Display(AISBottle, Standard_False);
Document.GetContext()->SetCurrentObject(AISBottle,Standard_False);
View.FitAll();

win.Run();
}

Change log

r4424 by micio on Jan 15, 2012   Diff
Bazaar/OCE : OpenCascade Community Edition
3d modeling kernel added
Go to: 
Project members, sign in to write a code review

Older revisions

All revisions of this file

File info

Size: 1019 bytes, 45 lines
Powered by Google Project Hosting