Advertisement
mantielero

Untitled

Nov 9th, 2022
1,237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 17.31 KB | None | 0 0
  1. /* Generated by Nim Compiler v1.6.6 */
  2. /* Compiled for: Linux, amd64, gcc */
  3. /* Command for C compiler:
  4.    g++ -c -std=gnu++14 -funsigned-char  -w -fmax-errors=3 -fpermissive -I/usr/include/opencascade/ -O3 -fno-strict-aliasing -fno-ident   -I/home/jose/.choosenim/toolchains/nim-1.6.6/lib -I/home/jose/src/nimlang/occt.nim/examples -o /home/jose/src/nimlang/occt.nim/examples/cache/@mviewer04.nim.cpp.o /home/jose/src/nimlang/occt.nim/examples/cache/@mviewer04.nim.cpp */
  5. #define NIM_INTBITS 64
  6.  
  7. #include "nimbase.h"
  8. #include "AIS_ViewController.hxx"
  9. #include "Standard_Handle.hxx"
  10. #include "AIS_InteractiveContext.hxx"
  11. #include "Standard_Transient.hxx"
  12. #include "V3d_View.hxx"
  13. #include <string.h>
  14. #include "Aspect_DisplayConnection.hxx"
  15. #include "OpenGl_GraphicDriver.hxx"
  16. #include "Graphic3d_GraphicDriver.hxx"
  17. #include "V3d_Viewer.hxx"
  18. #include "V3d_TypeOfView.hxx"
  19. #include "Xw_Window.hxx"
  20. #include "Aspect_Window.hxx"
  21. #include "Quantity_Color.hxx"
  22. #include "Quantity_NameOfColor.hxx"
  23. #include "Aspect_TypeOfTriedronPosition.hxx"
  24. #include "V3d_TypeOfVisualization.hxx"
  25. #include "Graphic3d_RenderingParams.hxx"
  26. #include "BRepPrimAPI_MakeBox.hxx"
  27. #include "BRepBuilderAPI_MakeShape.hxx"
  28. #include "BRepBuilderAPI_Command.hxx"
  29. #include "TopoDS_Solid.hxx"
  30. #include "TopoDS_Shape.hxx"
  31. #include "AIS_Shape.hxx"
  32. #include "AIS_InteractiveObject.hxx"
  33. #include "SelectMgr_SelectableObject.hxx"
  34. #include "PrsMgr_PresentableObject.hxx"
  35. #include "AIS_DisplayStatus.hxx"
  36. #undef LANGUAGE_C
  37. #undef MIPSEB
  38. #undef MIPSEL
  39. #undef PPC
  40. #undef R3000
  41. #undef R4000
  42. #undef i386
  43. #undef linux
  44. #undef mips
  45. #undef near
  46. #undef far
  47. #undef powerpc
  48. #undef unix
  49. #define nimfr_(x, y)
  50. #define nimln_(x, y)
  51. struct tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg;
  52. struct tyTuple__mOcJMV5G9c4Xbhu28ljzjXA;
  53. struct tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw;
  54. struct tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA;
  55. struct Exception;
  56. struct RootObj;
  57. struct TNimType;
  58. struct TNimNode;
  59. struct NimStringDesc;
  60. struct TGenericSeq;
  61. struct tySequence__uB9b75OUPRENsBAu4AnoePA;
  62. struct tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g;
  63. struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w;
  64. struct tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ;
  65. struct tyObject_GcStack__7fytPA5bBsob6See21YMRA;
  66. struct tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg;
  67. struct tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ;
  68. struct tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg;
  69. struct tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw;
  70. struct tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA;
  71. struct tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw;
  72. struct tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw;
  73. struct tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg;
  74. struct tyTuple__ujsjpB2O9cjj3uDHsXbnSzg;
  75. struct tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg;
  76. struct tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ;
  77. struct tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg;
  78. struct tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA;
  79. typedef opencascade::handle<AIS_InteractiveContext> TY__U9azJ3jnkWQljuWXj5dG30g;
  80. typedef opencascade::handle<V3d_View> TY__icTQkUhVkd9cEc0gJ9c2VwPg;
  81. struct tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg : public AIS_ViewController {
  82. TY__U9azJ3jnkWQljuWXj5dG30g myContext;
  83. TY__icTQkUhVkd9cEc0gJ9c2VwPg myView;
  84. };
  85. struct tyTuple__mOcJMV5G9c4Xbhu28ljzjXA {
  86. TY__U9azJ3jnkWQljuWXj5dG30g Field0;
  87. TY__icTQkUhVkd9cEc0gJ9c2VwPg Field1;
  88. };
  89. typedef opencascade::handle<Aspect_DisplayConnection> TY__keu8dJZTmN1bTjmh2YTMeA;
  90. typedef opencascade::handle<OpenGl_GraphicDriver> TY__FZHdszn6vruH9aCoz9aCktYQ;
  91. typedef opencascade::handle<Graphic3d_GraphicDriver> TY__WzQHB9c9cwo6CTGferBwI78g;
  92. typedef opencascade::handle<V3d_Viewer> TY__47tV2K1aaSZXiNrxUNujaw;
  93. typedef opencascade::handle<Xw_Window> TY__LyS0CtE7Da8V9c3SncboSbA;
  94. typedef opencascade::handle<Aspect_Window> TY__yB86VfuSyzthqado7ziZgg;
  95. typedef NU8 tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A;
  96. typedef NU8 tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ;
  97. typedef N_NIMCALL_PTR(void, tyProc__ojoeKfW4VYIm36I9cpDTQIg) (void* p, NI op);
  98. typedef N_NIMCALL_PTR(void*, tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ) (void* p);
  99. struct TNimType {
  100. NI size;
  101. NI align;
  102. tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A kind;
  103. tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ flags;
  104. TNimType* base;
  105. TNimNode* node;
  106. void* finalizer;
  107. tyProc__ojoeKfW4VYIm36I9cpDTQIg marker;
  108. tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ deepcopy;
  109. };
  110. struct RootObj {
  111. TNimType* m_type;
  112. };
  113. struct TGenericSeq {
  114. NI len;
  115. NI reserved;
  116. };
  117. struct NimStringDesc : public TGenericSeq {
  118. NIM_CHAR data[SEQ_DECL_SIZE];
  119. };
  120. struct Exception : public RootObj {
  121. Exception* parent;
  122. NCSTRING name;
  123. NimStringDesc* message;
  124. tySequence__uB9b75OUPRENsBAu4AnoePA* trace;
  125. Exception* up;
  126. };
  127. struct tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA : public Exception {
  128. };
  129. struct tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw : public tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA {
  130. };
  131. typedef NU8 tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ;
  132. struct TNimNode {
  133. tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ kind;
  134. NI offset;
  135. TNimType* typ;
  136. NCSTRING name;
  137. NI len;
  138. TNimNode** sons;
  139. };
  140. struct tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g {
  141. NI refcount;
  142. TNimType* typ;
  143. };
  144. struct tyObject_GcStack__7fytPA5bBsob6See21YMRA {
  145. void* bottom;
  146. };
  147. struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w {
  148. NI len;
  149. NI cap;
  150. tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g** d;
  151. };
  152. typedef tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ* tyArray__SPr7N6UKfuF549bNPiUvSRw[256];
  153. typedef NU32 tyArray__BHbOSqU1t9b3Gt7K2c6fQig[24];
  154. typedef tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg* tyArray__N1u1nqOgmuJN9cSZrnMHgOQ[32];
  155. typedef tyArray__N1u1nqOgmuJN9cSZrnMHgOQ tyArray__B6durA4ZCi1xjJvRtyYxMg[24];
  156. typedef tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw* tyArray__lh2A89ahMmYg9bCmpVaplLbA[256];
  157. struct tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA {
  158. tyArray__lh2A89ahMmYg9bCmpVaplLbA data;
  159. };
  160. typedef tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* tyArray__0aOLqZchNi8nWtMTi8ND8w[2];
  161. struct tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw {
  162. tyArray__0aOLqZchNi8nWtMTi8ND8w link;
  163. NI key;
  164. NI upperBound;
  165. NI level;
  166. };
  167. struct tyTuple__ujsjpB2O9cjj3uDHsXbnSzg {
  168. tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg* Field0;
  169. NI Field1;
  170. };
  171. typedef tyTuple__ujsjpB2O9cjj3uDHsXbnSzg tyArray__LzOv2eCDGiceMKQstCLmhw[30];
  172. struct tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg {
  173. NI len;
  174. tyArray__LzOv2eCDGiceMKQstCLmhw chunks;
  175. tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg* next;
  176. };
  177. struct tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg {
  178. NI minLargeObj;
  179. NI maxLargeObj;
  180. tyArray__SPr7N6UKfuF549bNPiUvSRw freeSmallChunks;
  181. NU32 flBitmap;
  182. tyArray__BHbOSqU1t9b3Gt7K2c6fQig slBitmap;
  183. tyArray__B6durA4ZCi1xjJvRtyYxMg matrix;
  184. tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw* llmem;
  185. NI currMem;
  186. NI maxMem;
  187. NI freeMem;
  188. NI occ;
  189. NI lastSize;
  190. tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA chunkStarts;
  191. tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* root;
  192. tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* deleted;
  193. tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* last;
  194. tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* freeAvlNodes;
  195. NIM_BOOL locked;
  196. NIM_BOOL blockChunkSizeIncrease;
  197. NI nextChunkSize;
  198. tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw bottomData;
  199. tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg heapLinks;
  200. };
  201. struct tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg {
  202. NI stackScans;
  203. NI cycleCollections;
  204. NI maxThreshold;
  205. NI maxStackSize;
  206. NI maxStackCells;
  207. NI cycleTableSize;
  208. NI64 maxPause;
  209. };
  210. struct tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ {
  211. NI counter;
  212. NI max;
  213. tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg* head;
  214. tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg** data;
  215. };
  216. struct tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ {
  217. tyObject_GcStack__7fytPA5bBsob6See21YMRA stack;
  218. NI cycleThreshold;
  219. NI zctThreshold;
  220. tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w zct;
  221. tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w decStack;
  222. tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w tempStack;
  223. NI recGcLock;
  224. tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg region;
  225. tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg stat;
  226. tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ marked;
  227. tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w additionalRoots;
  228. NI gcThreadId;
  229. };
  230. typedef opencascade::handle<AIS_Shape> TY__0sNjvi6cy22LOUKb6aOHyA;
  231. typedef opencascade::handle<AIS_InteractiveObject> TY__9cLINH5i7M3YCUgLs46CBaA;
  232. struct tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA {
  233. NCSTRING procname;
  234. NI line;
  235. NCSTRING filename;
  236. };
  237. struct tySequence__uB9b75OUPRENsBAu4AnoePA : TGenericSeq {
  238.   tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA data[SEQ_DECL_SIZE];
  239. };
  240. N_LIB_PRIVATE N_NIMCALL(void, main__viewer4852_397)(void);
  241. static N_INLINE(void, nimZeroMem)(void* p, NI size);
  242. static N_INLINE(void, nimSetMem__systemZmemory_7)(void* a, int v, NI size);
  243. N_LIB_PRIVATE N_NIMCALL(tyTuple__mOcJMV5G9c4Xbhu28ljzjXA, getContextAndView__viewer4852_25)(void);
  244. N_LIB_PRIVATE N_NOINLINE(void*, newObj)(TNimType* typ, NI size);
  245. N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
  246. static N_INLINE(void, nimGCunrefNoCycle)(void* p);
  247. static N_INLINE(void, decRef__system_5324)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
  248. static N_INLINE(NI, minuspercent___system_716)(NI x, NI y);
  249. static N_INLINE(NIM_BOOL, ltpercent___system_1005)(NI x, NI y);
  250. static N_INLINE(void, rtlAddZCT__system_5322)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
  251. N_LIB_PRIVATE N_NOINLINE(void, addZCT__system_5273)(tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w& s, tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
  252. static N_INLINE(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*, usrToCell__system_5279)(void* usr);
  253. static N_INLINE(void, asgnRef)(void** dest, void* src);
  254. static N_INLINE(void, incRef__system_5317)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
  255. static N_INLINE(NI, pluspercent___system_696)(NI x, NI y);
  256. N_LIB_PRIVATE N_NIMCALL(void, raiseExceptionEx)(Exception* e, NCSTRING ename, NCSTRING procname, NCSTRING filename, NI line);
  257. N_LIB_PRIVATE N_NIMCALL(TY__icTQkUhVkd9cEc0gJ9c2VwPg, view__viewer4852_21)(tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg* this_0);
  258. static N_INLINE(void, initStackBottomWith)(void* locals);
  259. N_LIB_PRIVATE N_NOINLINE(void, nimGC_setStackBottom)(void* theStackBottom);
  260. N_LIB_PRIVATE N_NIMCALL(void, systemDatInit000)(void);
  261. N_LIB_PRIVATE N_NIMCALL(void, systemInit000)(void);
  262. N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
  263. extern TNimType NTIrefvalueerror__Ie1m0dv1ZHg72IgPRr1cDw_;
  264. extern TNimType NTIvalueerror__yoNlBGx0D2tRizIdhQuENw_;
  265. STRING_LITERAL(TM__wD429azSPMakedXQ1XuV5lw_2, "Can\'t export null shape to STEP", 31);
  266. extern tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ gch__system_5226;
  267. static N_INLINE(void, nimSetMem__systemZmemory_7)(void* a, int v, NI size) {
  268.     void* T1_ = memset(a, v, ((size_t) (size)));
  269. }
  270. static N_INLINE(void, nimZeroMem)(void* p, NI size) {
  271.     nimSetMem__systemZmemory_7(p, ((int) 0), size);
  272. }
  273. static N_INLINE(NI, minuspercent___system_716)(NI x, NI y) {
  274.     NI result;
  275.     result = (NI)0;
  276.     result = ((NI) ((NU)((NU64)(((NU) (x))) - (NU64)(((NU) (y))))));
  277.     return result;
  278. }
  279. static N_INLINE(NIM_BOOL, ltpercent___system_1005)(NI x, NI y) {
  280.     NIM_BOOL result;
  281.     result = (NIM_BOOL)0;
  282.     result = ((NU64)(((NU) (x))) < (NU64)(((NU) (y))));
  283.     return result;
  284. }
  285. static N_INLINE(void, rtlAddZCT__system_5322)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
  286.     addZCT__system_5273(gch__system_5226.zct, c);
  287. }
  288. static N_INLINE(void, decRef__system_5324)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
  289.     (*c).refcount = minuspercent___system_716((*c).refcount, ((NI) 8));
  290.     {
  291.         NIM_BOOL T3_ = ltpercent___system_1005((*c).refcount, ((NI) 8));
  292.         if (!T3_) goto LA4_;
  293. {       rtlAddZCT__system_5322(c);
  294. }   }
  295.     LA4_: ;
  296. }
  297. static N_INLINE(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*, usrToCell__system_5279)(void* usr) {
  298.     tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* result;
  299.     result = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0;
  300.     NI T1_ = minuspercent___system_716(((NI) (ptrdiff_t) (usr)), ((NI) 16));
  301.     result = ((tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*) (T1_));
  302.     return result;
  303. }
  304. static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
  305.     tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* T1_ = usrToCell__system_5279(p);
  306.     decRef__system_5324(T1_);
  307. }
  308. static N_INLINE(NI, pluspercent___system_696)(NI x, NI y) {
  309.     NI result;
  310.     result = (NI)0;
  311.     result = ((NI) ((NU)((NU64)(((NU) (x))) + (NU64)(((NU) (y))))));
  312.     return result;
  313. }
  314. static N_INLINE(void, incRef__system_5317)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
  315.     (*c).refcount = pluspercent___system_696((*c).refcount, ((NI) 8));
  316. }
  317. static N_INLINE(void, asgnRef)(void** dest, void* src) {
  318.     {
  319.         if (!!((src == NIM_NIL))) goto LA3_;
  320. {       tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* T5_ = usrToCell__system_5279(src);
  321.         incRef__system_5317(T5_);
  322. }   }
  323.     LA3_: ;
  324.     {
  325.         if (!!(((*dest) == NIM_NIL))) goto LA8_;
  326. {       tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* T10_ = usrToCell__system_5279((*dest));
  327.         decRef__system_5324(T10_);
  328. }   }
  329.     LA8_: ;
  330.     (*dest) = src;
  331. }
  332. N_LIB_PRIVATE N_NIMCALL(tyTuple__mOcJMV5G9c4Xbhu28ljzjXA, getContextAndView__viewer4852_25)(void) {
  333.     tyTuple__mOcJMV5G9c4Xbhu28ljzjXA result;
  334. {   nimZeroMem((void*)(&result), sizeof(tyTuple__mOcJMV5G9c4Xbhu28ljzjXA));
  335.     TY__keu8dJZTmN1bTjmh2YTMeA aDisplay((new Aspect_DisplayConnection()));
  336.     TY__FZHdszn6vruH9aCoz9aCktYQ aDriverOpenGl((new OpenGl_GraphicDriver(aDisplay, NIM_TRUE)));
  337.     OpenGl_GraphicDriver* T1_ = aDriverOpenGl.get();
  338.     TY__WzQHB9c9cwo6CTGferBwI78g aDriver(((Graphic3d_GraphicDriver*) (T1_)));
  339.     TY__47tV2K1aaSZXiNrxUNujaw aViewer((new V3d_Viewer(aDriver)));
  340.     (* aViewer).SetDefaultLights();
  341.     (* aViewer).SetLightOn();
  342.     TY__icTQkUhVkd9cEc0gJ9c2VwPg myView((new V3d_View(aViewer, ((V3d_TypeOfView) 0))));
  343.     TY__LyS0CtE7Da8V9c3SncboSbA aWindow((new Xw_Window(aDisplay, "OCCT Viewer", ((int) 100), ((int) 100), ((int) 512), ((int) 512))));
  344.     Xw_Window* T2_ = aWindow.get();
  345.     TY__yB86VfuSyzthqado7ziZgg aWinAspect(((Aspect_Window*) (T2_)));
  346.     (* myView).SetWindow(aWinAspect, NIM_NIL);
  347.     (* myView).SetBackgroundColor(Quantity_Color(((Quantity_NameOfColor) 182)));
  348.     (* myView).TriedronDisplay(((Aspect_TypeOfTriedronPosition) 6), Quantity_Color(((Quantity_NameOfColor) 508)), 0.1f, ((V3d_TypeOfVisualization) 0));
  349.     (* myView).ChangeRenderingParams().RenderResolutionScale = 2.0f;
  350.     TY__U9azJ3jnkWQljuWXj5dG30g myContext((new AIS_InteractiveContext(aViewer)));
  351.     BRepPrimAPI_MakeBox mybox(1.0f, 2.0f, 3.0f);
  352.     mybox.Build();
  353.     TopoDS_Solid solid = mybox.Solid();
  354.     {
  355.         tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw* T7_;
  356.         NimStringDesc* T8_;
  357.         if (!solid.IsNull()) goto LA5_;
  358. {       T7_ = NIM_NIL;
  359.         T7_ = (tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw*) newObj((&NTIrefvalueerror__Ie1m0dv1ZHg72IgPRr1cDw_), sizeof(tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw));
  360.         (*T7_).m_type = (&NTIvalueerror__yoNlBGx0D2tRizIdhQuENw_);
  361.         (*T7_).name = "ValueError";
  362.         T8_ = NIM_NIL;
  363.         T8_ = (*T7_).message; (*T7_).message = copyStringRC1(((NimStringDesc*) &TM__wD429azSPMakedXQ1XuV5lw_2));
  364.         if (T8_) nimGCunrefNoCycle(T8_);
  365.         asgnRef((void**) (&(*T7_).parent), ((Exception*) NIM_NIL));
  366.         raiseExceptionEx((Exception*)T7_, "ValueError", "getContextAndView", "viewer04.nim", 56);
  367. }   }
  368.     LA5_: ;
  369.     TopoDS_Shape aShape = solid;
  370.     TY__0sNjvi6cy22LOUKb6aOHyA aShapeAis((new AIS_Shape(aShape)));
  371.     AIS_Shape* T9_ = aShapeAis.get();
  372.     TY__9cLINH5i7M3YCUgLs46CBaA aShapePrs(((AIS_InteractiveObject*) (T9_)));
  373.     (* myContext).Display(aShapeAis, ((int) 1), ((int) 0), NIM_FALSE, ((AIS_DisplayStatus) 2));
  374.     (* myView).FitAll(0.01f, NIM_FALSE);
  375.     (* aWindow).Map();
  376.     (* myView).Redraw();
  377.     TY__U9azJ3jnkWQljuWXj5dG30g colontmp_ = myContext;
  378.     TY__icTQkUhVkd9cEc0gJ9c2VwPg colontmp__2 = myView;
  379.     result.Field0 = colontmp_;
  380.     result.Field1 = colontmp__2;
  381.     goto BeforeRet_;
  382.     }BeforeRet_: ;
  383.     return result;
  384. }
  385. N_LIB_PRIVATE N_NIMCALL(TY__icTQkUhVkd9cEc0gJ9c2VwPg, view__viewer4852_21)(tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg* this_0) {
  386.     TY__icTQkUhVkd9cEc0gJ9c2VwPg result;
  387. {   result = (*this_0).myView;
  388.     goto BeforeRet_;
  389.     }BeforeRet_: ;
  390.     return result;
  391. }
  392. N_LIB_PRIVATE N_NIMCALL(void, main__viewer4852_397)(void) {
  393.     tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg aViewer;
  394.     nimZeroMem((void*)(&aViewer), sizeof(tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg));
  395.     tyTuple__mOcJMV5G9c4Xbhu28ljzjXA T1_ = getContextAndView__viewer4852_25();
  396.     tyTuple__mOcJMV5G9c4Xbhu28ljzjXA _ = T1_;
  397.     aViewer.myContext = _.Field0;
  398.     aViewer.myView = _.Field1;
  399.     TY__icTQkUhVkd9cEc0gJ9c2VwPg T2_ = view__viewer4852_21((&aViewer));
  400.     Aspect_Window* T3_ = (* T2_).Window().get();
  401.     TY__LyS0CtE7Da8V9c3SncboSbA aWindow(((Xw_Window*) (T3_)));
  402.     TY__icTQkUhVkd9cEc0gJ9c2VwPg T4_ = view__viewer4852_21((&aViewer));
  403.     TY__keu8dJZTmN1bTjmh2YTMeA aDispConn = (* (* (* T4_).Viewer()).Driver()).GetDisplayConnection();
  404.     {
  405.         while (1) {
  406.         }
  407.     }
  408. }
  409. static N_INLINE(void, initStackBottomWith)(void* locals) {
  410.     nimGC_setStackBottom(locals);
  411. }
  412.  
  413. N_LIB_PRIVATE void PreMainInner(void) {
  414. }
  415.  
  416. N_LIB_PRIVATE int cmdCount;
  417. N_LIB_PRIVATE char** cmdLine;
  418. N_LIB_PRIVATE char** gEnv;
  419. N_LIB_PRIVATE void PreMain(void) {
  420.     void (*volatile inner)(void);
  421.     inner = PreMainInner;
  422.     systemDatInit000();
  423.     initStackBottomWith((void *)&inner);
  424.     systemInit000();
  425.     (*inner)();
  426. }
  427.  
  428. N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
  429.     NimMainModule();
  430. }
  431.  
  432. N_CDECL(void, NimMain)(void) {
  433.     void (*volatile inner)(void);
  434.     PreMain();
  435.     inner = NimMainInner;
  436.     initStackBottomWith((void *)&inner);
  437.     (*inner)();
  438. }
  439.  
  440. int main(int argc, char** args, char** env) {
  441.     cmdLine = args;
  442.     cmdCount = argc;
  443.     gEnv = env;
  444.     NimMain();
  445.     return nim_program_result;
  446. }
  447.  
  448. N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) {
  449. {
  450.     main__viewer4852_397();
  451. }
  452. }
  453.  
  454.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement