mantielero

Untitled

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