mantielero

Untitled

Nov 9th, 2022
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 23.52 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/   -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_(proc, file) \
  50.       TFrame FR_; \
  51.       FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_);
  52.  
  53.   #  define nimfrs_(proc, file, slots, length) \
  54.       struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename; NI len; VarSlot s[slots];} FR_; \
  55.       FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_);
  56.  
  57.   #  define nimln_(n, file) \
  58.       FR_.line = n; FR_.filename = file;
  59.   struct tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg;
  60. struct tyTuple__mOcJMV5G9c4Xbhu28ljzjXA;
  61. struct tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw;
  62. struct tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA;
  63. struct Exception;
  64. struct RootObj;
  65. struct TNimType;
  66. struct TNimNode;
  67. struct NimStringDesc;
  68. struct TGenericSeq;
  69. struct tySequence__uB9b75OUPRENsBAu4AnoePA;
  70. struct tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g;
  71. struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w;
  72. struct tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ;
  73. struct tyObject_GcStack__7fytPA5bBsob6See21YMRA;
  74. struct tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg;
  75. struct tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ;
  76. struct tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg;
  77. struct tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw;
  78. struct tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA;
  79. struct tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw;
  80. struct tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw;
  81. struct tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg;
  82. struct tyTuple__ujsjpB2O9cjj3uDHsXbnSzg;
  83. struct tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg;
  84. struct tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ;
  85. struct tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg;
  86. struct tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA;
  87. typedef opencascade::handle<AIS_InteractiveContext> TY__U9azJ3jnkWQljuWXj5dG30g;
  88. typedef opencascade::handle<V3d_View> TY__icTQkUhVkd9cEc0gJ9c2VwPg;
  89. struct tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg : public AIS_ViewController {
  90. TY__U9azJ3jnkWQljuWXj5dG30g myContext;
  91. TY__icTQkUhVkd9cEc0gJ9c2VwPg myView;
  92. };
  93. struct tyTuple__mOcJMV5G9c4Xbhu28ljzjXA {
  94. TY__U9azJ3jnkWQljuWXj5dG30g Field0;
  95. TY__icTQkUhVkd9cEc0gJ9c2VwPg Field1;
  96. };
  97. typedef opencascade::handle<Aspect_DisplayConnection> TY__keu8dJZTmN1bTjmh2YTMeA;
  98. typedef opencascade::handle<OpenGl_GraphicDriver> TY__FZHdszn6vruH9aCoz9aCktYQ;
  99. typedef opencascade::handle<Graphic3d_GraphicDriver> TY__WzQHB9c9cwo6CTGferBwI78g;
  100. typedef opencascade::handle<V3d_Viewer> TY__47tV2K1aaSZXiNrxUNujaw;
  101. typedef opencascade::handle<Xw_Window> TY__LyS0CtE7Da8V9c3SncboSbA;
  102. typedef opencascade::handle<Aspect_Window> TY__yB86VfuSyzthqado7ziZgg;
  103. typedef NU8 tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A;
  104. typedef NU8 tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ;
  105. typedef N_NIMCALL_PTR(void, tyProc__ojoeKfW4VYIm36I9cpDTQIg) (void* p, NI op);
  106. typedef N_NIMCALL_PTR(void*, tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ) (void* p);
  107. struct TNimType {
  108. NI size;
  109. NI align;
  110. tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A kind;
  111. tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ flags;
  112. TNimType* base;
  113. TNimNode* node;
  114. void* finalizer;
  115. tyProc__ojoeKfW4VYIm36I9cpDTQIg marker;
  116. tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ deepcopy;
  117. };
  118. struct RootObj {
  119. TNimType* m_type;
  120. };
  121. struct TGenericSeq {
  122. NI len;
  123. NI reserved;
  124. };
  125. struct NimStringDesc : public TGenericSeq {
  126. NIM_CHAR data[SEQ_DECL_SIZE];
  127. };
  128. struct Exception : public RootObj {
  129. Exception* parent;
  130. NCSTRING name;
  131. NimStringDesc* message;
  132. tySequence__uB9b75OUPRENsBAu4AnoePA* trace;
  133. Exception* up;
  134. };
  135. struct tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA : public Exception {
  136. };
  137. struct tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw : public tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA {
  138. };
  139. typedef NU8 tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ;
  140. struct TNimNode {
  141. tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ kind;
  142. NI offset;
  143. TNimType* typ;
  144. NCSTRING name;
  145. NI len;
  146. TNimNode** sons;
  147. };
  148. struct tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g {
  149. NI refcount;
  150. TNimType* typ;
  151. };
  152. struct tyObject_GcStack__7fytPA5bBsob6See21YMRA {
  153. void* bottom;
  154. };
  155. struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w {
  156. NI len;
  157. NI cap;
  158. tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g** d;
  159. };
  160. typedef tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ* tyArray__SPr7N6UKfuF549bNPiUvSRw[256];
  161. typedef NU32 tyArray__BHbOSqU1t9b3Gt7K2c6fQig[24];
  162. typedef tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg* tyArray__N1u1nqOgmuJN9cSZrnMHgOQ[32];
  163. typedef tyArray__N1u1nqOgmuJN9cSZrnMHgOQ tyArray__B6durA4ZCi1xjJvRtyYxMg[24];
  164. typedef tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw* tyArray__lh2A89ahMmYg9bCmpVaplLbA[256];
  165. struct tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA {
  166. tyArray__lh2A89ahMmYg9bCmpVaplLbA data;
  167. };
  168. typedef tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* tyArray__0aOLqZchNi8nWtMTi8ND8w[2];
  169. struct tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw {
  170. tyArray__0aOLqZchNi8nWtMTi8ND8w link;
  171. NI key;
  172. NI upperBound;
  173. NI level;
  174. };
  175. struct tyTuple__ujsjpB2O9cjj3uDHsXbnSzg {
  176. tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg* Field0;
  177. NI Field1;
  178. };
  179. typedef tyTuple__ujsjpB2O9cjj3uDHsXbnSzg tyArray__LzOv2eCDGiceMKQstCLmhw[30];
  180. struct tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg {
  181. NI len;
  182. tyArray__LzOv2eCDGiceMKQstCLmhw chunks;
  183. tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg* next;
  184. };
  185. struct tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg {
  186. NI minLargeObj;
  187. NI maxLargeObj;
  188. tyArray__SPr7N6UKfuF549bNPiUvSRw freeSmallChunks;
  189. NU32 flBitmap;
  190. tyArray__BHbOSqU1t9b3Gt7K2c6fQig slBitmap;
  191. tyArray__B6durA4ZCi1xjJvRtyYxMg matrix;
  192. tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw* llmem;
  193. NI currMem;
  194. NI maxMem;
  195. NI freeMem;
  196. NI occ;
  197. NI lastSize;
  198. tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA chunkStarts;
  199. tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* root;
  200. tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* deleted;
  201. tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* last;
  202. tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* freeAvlNodes;
  203. NIM_BOOL locked;
  204. NIM_BOOL blockChunkSizeIncrease;
  205. NI nextChunkSize;
  206. tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw bottomData;
  207. tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg heapLinks;
  208. };
  209. struct tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg {
  210. NI stackScans;
  211. NI cycleCollections;
  212. NI maxThreshold;
  213. NI maxStackSize;
  214. NI maxStackCells;
  215. NI cycleTableSize;
  216. NI64 maxPause;
  217. };
  218. struct tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ {
  219. NI counter;
  220. NI max;
  221. tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg* head;
  222. tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg** data;
  223. };
  224. struct tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ {
  225. tyObject_GcStack__7fytPA5bBsob6See21YMRA stack;
  226. NI cycleThreshold;
  227. NI zctThreshold;
  228. tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w zct;
  229. tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w decStack;
  230. tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w tempStack;
  231. NI recGcLock;
  232. tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg region;
  233. tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg stat;
  234. tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ marked;
  235. tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w additionalRoots;
  236. NI gcThreadId;
  237. };
  238. typedef opencascade::handle<AIS_Shape> TY__0sNjvi6cy22LOUKb6aOHyA;
  239. typedef opencascade::handle<AIS_InteractiveObject> TY__9cLINH5i7M3YCUgLs46CBaA;
  240. struct tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA {
  241. NCSTRING procname;
  242. NI line;
  243. NCSTRING filename;
  244. };
  245. struct tySequence__uB9b75OUPRENsBAu4AnoePA : TGenericSeq {
  246.   tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA data[SEQ_DECL_SIZE];
  247. };
  248. N_LIB_PRIVATE N_NIMCALL(void, main__viewer4852_397)(void);
  249. static N_INLINE(void, nimZeroMem)(void* p, NI size);
  250. static N_INLINE(void, nimSetMem__systemZmemory_7)(void* a, int v, NI size);
  251. N_LIB_PRIVATE N_NIMCALL(tyTuple__mOcJMV5G9c4Xbhu28ljzjXA, getContextAndView__viewer4852_25)(void);
  252. N_LIB_PRIVATE N_NOINLINE(void*, newObj)(TNimType* typ, NI size);
  253. N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
  254. static N_INLINE(void, nimGCunrefNoCycle)(void* p);
  255. static N_INLINE(void, decRef__system_5358)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
  256. static N_INLINE(NI, minuspercent___system_716)(NI x, NI y);
  257. static N_INLINE(void, nimFrame)(TFrame* s);
  258. N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_2993)(void);
  259. static N_INLINE(void, popFrame)(void);
  260. static N_INLINE(NIM_BOOL, ltpercent___system_1005)(NI x, NI y);
  261. static N_INLINE(void, rtlAddZCT__system_5356)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
  262. N_LIB_PRIVATE N_NOINLINE(void, addZCT__system_5307)(tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w& s, tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
  263. static N_INLINE(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*, usrToCell__system_5313)(void* usr);
  264. static N_INLINE(void, asgnRef)(void** dest, void* src);
  265. static N_INLINE(void, incRef__system_5351)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
  266. static N_INLINE(NI, pluspercent___system_696)(NI x, NI y);
  267. N_LIB_PRIVATE N_NIMCALL(void, raiseExceptionEx)(Exception* e, NCSTRING ename, NCSTRING procname, NCSTRING filename, NI line);
  268. N_LIB_PRIVATE N_NIMCALL(TY__icTQkUhVkd9cEc0gJ9c2VwPg, view__viewer4852_21)(tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg* this_0);
  269. static N_INLINE(void, initStackBottomWith)(void* locals);
  270. N_LIB_PRIVATE N_NOINLINE(void, nimGC_setStackBottom)(void* theStackBottom);
  271. N_LIB_PRIVATE N_NIMCALL(void, systemDatInit000)(void);
  272. N_LIB_PRIVATE N_NIMCALL(void, systemInit000)(void);
  273. N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
  274. extern TNimType NTIrefvalueerror__Ie1m0dv1ZHg72IgPRr1cDw_;
  275. extern TNimType NTIvalueerror__yoNlBGx0D2tRizIdhQuENw_;
  276. STRING_LITERAL(TM__wD429azSPMakedXQ1XuV5lw_2, "Can\'t export null shape to STEP", 31);
  277. extern TFrame* framePtr__system_2564;
  278. extern TFrame* framePtr__system_2564;
  279. extern TFrame* framePtr__system_2564;
  280. extern TFrame* framePtr__system_2564;
  281. extern TFrame* framePtr__system_2564;
  282. extern TFrame* framePtr__system_2564;
  283. extern tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ gch__system_5260;
  284. static N_INLINE(void, nimSetMem__systemZmemory_7)(void* a, int v, NI size) {
  285.     void* T1_ = memset(a, v, ((size_t) (size)));
  286. }
  287. static N_INLINE(void, nimZeroMem)(void* p, NI size) {
  288.     nimSetMem__systemZmemory_7(p, ((int) 0), size);
  289. }
  290. static N_INLINE(void, nimFrame)(TFrame* s) {
  291.     {
  292.         if (!(framePtr__system_2564 == ((TFrame*) NIM_NIL))) goto LA3_;
  293. {       (*s).calldepth = ((NI16) 0);
  294. }   }
  295.     goto LA1_;
  296.     LA3_: ;
  297.     {
  298.         (*s).calldepth = (NI16)((*framePtr__system_2564).calldepth + ((NI16) 1));
  299.     }
  300.     LA1_: ;
  301.     (*s).prev = framePtr__system_2564;
  302.     framePtr__system_2564 = s;
  303.     {
  304.         if (!((*s).calldepth == ((NI16) 2000))) goto LA8_;
  305. {       callDepthLimitReached__system_2993();
  306. }   }
  307.     LA8_: ;
  308. }
  309. static N_INLINE(void, popFrame)(void) {
  310.     framePtr__system_2564 = (*framePtr__system_2564).prev;
  311. }
  312. static N_INLINE(NI, minuspercent___system_716)(NI x, NI y) {
  313.     NI result;
  314.     nimfr_("-%", "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/arithmetics.nim");
  315.     result = (NI)0;
  316.     nimln_(414, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/arithmetics.nim");
  317.     nimln_(418, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/arithmetics.nim");
  318.     result = ((NI) ((NU)((NU64)(((NU) (x))) - (NU64)(((NU) (y))))));
  319.     popFrame();
  320.     return result;
  321. }
  322. static N_INLINE(NIM_BOOL, ltpercent___system_1005)(NI x, NI y) {
  323.     NIM_BOOL result;
  324.     nimfr_("<%", "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/comparisons.nim");
  325.     result = (NIM_BOOL)0;
  326.     nimln_(186, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/comparisons.nim");
  327.     nimln_(188, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/comparisons.nim");
  328.     result = ((NU64)(((NU) (x))) < (NU64)(((NU) (y))));
  329.     popFrame();
  330.     return result;
  331. }
  332. static N_INLINE(void, rtlAddZCT__system_5356)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
  333.     nimfr_("rtlAddZCT", "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
  334.     nimln_(243, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
  335.     addZCT__system_5307(gch__system_5260.zct, c);
  336.     popFrame();
  337. }
  338. static N_INLINE(void, decRef__system_5358)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
  339.     nimfr_("decRef", "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
  340.     nimln_(248, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
  341.     (*c).refcount = minuspercent___system_716((*c).refcount, ((NI) 8));
  342.     nimln_(249, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
  343.     {
  344.         NIM_BOOL T3_ = ltpercent___system_1005((*c).refcount, ((NI) 8));
  345.         if (!T3_) goto LA4_;
  346. {       nimln_(250, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
  347.         rtlAddZCT__system_5356(c);
  348. }   }
  349.     LA4_: ;
  350.     popFrame();
  351. }
  352. static N_INLINE(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*, usrToCell__system_5313)(void* usr) {
  353.     tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* result;
  354.     nimfr_("usrToCell", "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
  355.     result = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0;
  356.     nimln_(177, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
  357.     NI T1_ = minuspercent___system_716(((NI) (ptrdiff_t) (usr)), ((NI) 16));
  358.     result = ((tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*) (T1_));
  359.     popFrame();
  360.     return result;
  361. }
  362. static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
  363.     nimfr_("nimGCunrefNoCycle", "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
  364.     nimln_(276, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
  365.     tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* T1_ = usrToCell__system_5313(p);
  366.     decRef__system_5358(T1_);
  367.     popFrame();
  368. }
  369. static N_INLINE(NI, pluspercent___system_696)(NI x, NI y) {
  370.     NI result;
  371.     nimfr_("+%", "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/arithmetics.nim");
  372.     result = (NI)0;
  373.     nimln_(403, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/arithmetics.nim");
  374.     nimln_(407, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/arithmetics.nim");
  375.     result = ((NI) ((NU)((NU64)(((NU) (x))) + (NU64)(((NU) (y))))));
  376.     popFrame();
  377.     return result;
  378. }
  379. static N_INLINE(void, incRef__system_5351)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
  380.     nimfr_("incRef", "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
  381.     nimln_(231, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
  382.     (*c).refcount = pluspercent___system_696((*c).refcount, ((NI) 8));
  383.     popFrame();
  384. }
  385. static N_INLINE(void, asgnRef)(void** dest, void* src) {
  386.     nimfr_("asgnRef", "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
  387.     nimln_(286, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
  388.     {
  389.         if (!!((src == NIM_NIL))) goto LA3_;
  390. {       tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* T5_ = usrToCell__system_5313(src);
  391.         incRef__system_5351(T5_);
  392. }   }
  393.     LA3_: ;
  394.     nimln_(287, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
  395.     {
  396.         if (!!(((*dest) == NIM_NIL))) goto LA8_;
  397. {       tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* T10_ = usrToCell__system_5313((*dest));
  398.         decRef__system_5358(T10_);
  399. }   }
  400.     LA8_: ;
  401.     nimln_(288, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
  402.     (*dest) = src;
  403.     popFrame();
  404. }
  405. N_LIB_PRIVATE N_NIMCALL(tyTuple__mOcJMV5G9c4Xbhu28ljzjXA, getContextAndView__viewer4852_25)(void) {
  406.     tyTuple__mOcJMV5G9c4Xbhu28ljzjXA result;
  407.     nimfr_("getContextAndView", "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  408. {   nimZeroMem((void*)(&result), sizeof(tyTuple__mOcJMV5G9c4Xbhu28ljzjXA));
  409.     nimln_(27, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  410.     TY__keu8dJZTmN1bTjmh2YTMeA aDisplay((new Aspect_DisplayConnection()));
  411.     nimln_(28, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  412.     TY__FZHdszn6vruH9aCoz9aCktYQ aDriverOpenGl((new OpenGl_GraphicDriver(aDisplay, NIM_TRUE)));
  413.     nimln_(29, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  414.     OpenGl_GraphicDriver* T1_ = aDriverOpenGl.get();
  415.     TY__WzQHB9c9cwo6CTGferBwI78g aDriver(((Graphic3d_GraphicDriver*) (T1_)));
  416.     nimln_(34, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  417.     TY__47tV2K1aaSZXiNrxUNujaw aViewer((new V3d_Viewer(aDriver)));
  418.     nimln_(35, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  419.     (* aViewer).SetDefaultLights();
  420.     nimln_(36, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  421.     (* aViewer).SetLightOn();
  422.     nimln_(39, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  423.     TY__icTQkUhVkd9cEc0gJ9c2VwPg myView((new V3d_View(aViewer, ((V3d_TypeOfView) 0))));
  424.     nimln_(40, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  425.     TY__LyS0CtE7Da8V9c3SncboSbA aWindow((new Xw_Window(aDisplay, "OCCT Viewer", ((int) 100), ((int) 100), ((int) 512), ((int) 512))));
  426.     nimln_(41, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  427.     Xw_Window* T2_ = aWindow.get();
  428.     TY__yB86VfuSyzthqado7ziZgg aWinAspect(((Aspect_Window*) (T2_)));
  429.     nimln_(43, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  430.     (* myView).SetWindow(aWinAspect, NIM_NIL);
  431.     nimln_(44, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  432.     (* myView).SetBackgroundColor(Quantity_Color(((Quantity_NameOfColor) 182)));
  433.     nimln_(45, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  434.     (* myView).TriedronDisplay(((Aspect_TypeOfTriedronPosition) 6), Quantity_Color(((Quantity_NameOfColor) 508)), 0.1f, ((V3d_TypeOfVisualization) 0));
  435.     nimln_(46, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  436.     (* myView).ChangeRenderingParams().RenderResolutionScale = 2.0f;
  437.     nimln_(49, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  438.     TY__U9azJ3jnkWQljuWXj5dG30g myContext((new AIS_InteractiveContext(aViewer)));
  439.     nimln_(52, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  440.     BRepPrimAPI_MakeBox mybox(1.0f, 2.0f, 3.0f);
  441.     nimln_(53, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  442.     mybox.Build();
  443.     nimln_(54, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  444.     TopoDS_Solid solid = mybox.Solid();
  445.     nimln_(55, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  446.     {
  447.         tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw* T7_;
  448.         NimStringDesc* T8_;
  449.         if (!solid.IsNull()) goto LA5_;
  450. {       T7_ = NIM_NIL;
  451.         T7_ = (tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw*) newObj((&NTIrefvalueerror__Ie1m0dv1ZHg72IgPRr1cDw_), sizeof(tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw));
  452.         (*T7_).m_type = (&NTIvalueerror__yoNlBGx0D2tRizIdhQuENw_);
  453.         (*T7_).name = "ValueError";
  454.         T8_ = NIM_NIL;
  455.         T8_ = (*T7_).message; (*T7_).message = copyStringRC1(((NimStringDesc*) &TM__wD429azSPMakedXQ1XuV5lw_2));
  456.         if (T8_) nimGCunrefNoCycle(T8_);
  457.         asgnRef((void**) (&(*T7_).parent), ((Exception*) NIM_NIL));
  458.         nimln_(56, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  459.         raiseExceptionEx((Exception*)T7_, "ValueError", "getContextAndView", "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim", 56);
  460. }   }
  461.     LA5_: ;
  462.     nimln_(58, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  463.     TopoDS_Shape aShape = solid;
  464.     nimln_(59, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  465.     TY__0sNjvi6cy22LOUKb6aOHyA aShapeAis((new AIS_Shape(aShape)));
  466.     nimln_(60, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  467.     AIS_Shape* T9_ = aShapeAis.get();
  468.     TY__9cLINH5i7M3YCUgLs46CBaA aShapePrs(((AIS_InteractiveObject*) (T9_)));
  469.     nimln_(61, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  470.     (* myContext).Display(aShapeAis, ((int) 1), ((int) 0), NIM_FALSE, ((AIS_DisplayStatus) 2));
  471.     nimln_(62, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  472.     (* myView).FitAll(0.01f, NIM_FALSE);
  473.     nimln_(64, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  474.     (* aWindow).Map();
  475.     nimln_(65, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  476.     (* myView).Redraw();
  477.     nimln_(66, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  478.     TY__U9azJ3jnkWQljuWXj5dG30g colontmp_ = myContext;
  479.     TY__icTQkUhVkd9cEc0gJ9c2VwPg colontmp__2 = myView;
  480.     result.Field0 = colontmp_;
  481.     result.Field1 = colontmp__2;
  482.     goto BeforeRet_;
  483.     }BeforeRet_: ;
  484.     popFrame();
  485.     return result;
  486. }
  487. N_LIB_PRIVATE N_NIMCALL(TY__icTQkUhVkd9cEc0gJ9c2VwPg, view__viewer4852_21)(tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg* this_0) {
  488.     TY__icTQkUhVkd9cEc0gJ9c2VwPg result;
  489.     nimfr_("view", "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  490. {   nimln_(19, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  491.     result = (*this_0).myView;
  492.     goto BeforeRet_;
  493.     }BeforeRet_: ;
  494.     popFrame();
  495.     return result;
  496. }
  497. N_LIB_PRIVATE N_NIMCALL(void, main__viewer4852_397)(void) {
  498.     tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg aViewer;
  499.     nimfr_("main", "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  500.     nimZeroMem((void*)(&aViewer), sizeof(tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg));
  501.     nimln_(74, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  502.     tyTuple__mOcJMV5G9c4Xbhu28ljzjXA T1_ = getContextAndView__viewer4852_25();
  503.     tyTuple__mOcJMV5G9c4Xbhu28ljzjXA _ = T1_;
  504.     aViewer.myContext = _.Field0;
  505.     aViewer.myView = _.Field1;
  506.     nimln_(76, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  507.     TY__icTQkUhVkd9cEc0gJ9c2VwPg T2_ = view__viewer4852_21((&aViewer));
  508.     Aspect_Window* T3_ = (* T2_).Window().get();
  509.     TY__LyS0CtE7Da8V9c3SncboSbA aWindow(((Xw_Window*) (T3_)));
  510.     nimln_(78, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  511.     TY__icTQkUhVkd9cEc0gJ9c2VwPg T4_ = view__viewer4852_21((&aViewer));
  512.     TY__keu8dJZTmN1bTjmh2YTMeA aDispConn = (* (* (* T4_).Viewer()).Driver()).GetDisplayConnection();
  513.     {
  514.         nimln_(81, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  515.         while (1) {
  516.         }
  517.     }
  518.     popFrame();
  519. }
  520. static N_INLINE(void, initStackBottomWith)(void* locals) {
  521.     nimGC_setStackBottom(locals);
  522. }
  523.  
  524. N_LIB_PRIVATE void PreMainInner(void) {
  525. }
  526.  
  527. N_LIB_PRIVATE int cmdCount;
  528. N_LIB_PRIVATE char** cmdLine;
  529. N_LIB_PRIVATE char** gEnv;
  530. N_LIB_PRIVATE void PreMain(void) {
  531.     void (*volatile inner)(void);
  532.     inner = PreMainInner;
  533.     systemDatInit000();
  534.     initStackBottomWith((void *)&inner);
  535.     systemInit000();
  536.     (*inner)();
  537. }
  538.  
  539. N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
  540.     NimMainModule();
  541. }
  542.  
  543. N_CDECL(void, NimMain)(void) {
  544.     void (*volatile inner)(void);
  545.     PreMain();
  546.     inner = NimMainInner;
  547.     initStackBottomWith((void *)&inner);
  548.     (*inner)();
  549. }
  550.  
  551. int main(int argc, char** args, char** env) {
  552.     cmdLine = args;
  553.     cmdCount = argc;
  554.     gEnv = env;
  555.     NimMain();
  556.     return nim_program_result;
  557. }
  558.  
  559. N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) {
  560. {
  561.     nimfr_("viewer04", "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  562.     nimln_(84, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
  563.     main__viewer4852_397();
  564.     popFrame();
  565. }
  566. }
  567.  
  568.  
Add Comment
Please, Sign In to add comment