Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Generated by Nim Compiler v1.6.6 */
- /* Compiled for: Linux, amd64, gcc */
- /* Command for C compiler:
- 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 */
- #define NIM_INTBITS 64
- #include "nimbase.h"
- #include "AIS_ViewController.hxx"
- #include "Standard_Handle.hxx"
- #include "AIS_InteractiveContext.hxx"
- #include "Standard_Transient.hxx"
- #include "V3d_View.hxx"
- #include <string.h>
- #include "Aspect_DisplayConnection.hxx"
- #include "OpenGl_GraphicDriver.hxx"
- #include "Graphic3d_GraphicDriver.hxx"
- #include "V3d_Viewer.hxx"
- #include "V3d_TypeOfView.hxx"
- #include "Xw_Window.hxx"
- #include "Aspect_Window.hxx"
- #include "Quantity_Color.hxx"
- #include "Quantity_NameOfColor.hxx"
- #include "Aspect_TypeOfTriedronPosition.hxx"
- #include "V3d_TypeOfVisualization.hxx"
- #include "Graphic3d_RenderingParams.hxx"
- #include "BRepPrimAPI_MakeBox.hxx"
- #include "BRepBuilderAPI_MakeShape.hxx"
- #include "BRepBuilderAPI_Command.hxx"
- #include "TopoDS_Solid.hxx"
- #include "TopoDS_Shape.hxx"
- #include "AIS_Shape.hxx"
- #include "AIS_InteractiveObject.hxx"
- #include "SelectMgr_SelectableObject.hxx"
- #include "PrsMgr_PresentableObject.hxx"
- #include "AIS_DisplayStatus.hxx"
- #undef LANGUAGE_C
- #undef MIPSEB
- #undef MIPSEL
- #undef PPC
- #undef R3000
- #undef R4000
- #undef i386
- #undef linux
- #undef mips
- #undef near
- #undef far
- #undef powerpc
- #undef unix
- # define nimfr_(proc, file) \
- TFrame FR_; \
- FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_);
- # define nimfrs_(proc, file, slots, length) \
- struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename; NI len; VarSlot s[slots];} FR_; \
- FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_);
- # define nimln_(n, file) \
- FR_.line = n; FR_.filename = file;
- struct tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg;
- struct tyTuple__mOcJMV5G9c4Xbhu28ljzjXA;
- struct tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw;
- struct tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA;
- struct Exception;
- struct RootObj;
- struct TNimType;
- struct TNimNode;
- struct NimStringDesc;
- struct TGenericSeq;
- struct tySequence__uB9b75OUPRENsBAu4AnoePA;
- struct tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g;
- struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w;
- struct tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ;
- struct tyObject_GcStack__7fytPA5bBsob6See21YMRA;
- struct tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg;
- struct tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ;
- struct tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg;
- struct tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw;
- struct tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA;
- struct tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw;
- struct tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw;
- struct tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg;
- struct tyTuple__ujsjpB2O9cjj3uDHsXbnSzg;
- struct tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg;
- struct tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ;
- struct tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg;
- struct tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA;
- typedef opencascade::handle<AIS_InteractiveContext> TY__U9azJ3jnkWQljuWXj5dG30g;
- typedef opencascade::handle<V3d_View> TY__icTQkUhVkd9cEc0gJ9c2VwPg;
- struct tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg : public AIS_ViewController {
- TY__U9azJ3jnkWQljuWXj5dG30g myContext;
- TY__icTQkUhVkd9cEc0gJ9c2VwPg myView;
- };
- struct tyTuple__mOcJMV5G9c4Xbhu28ljzjXA {
- TY__U9azJ3jnkWQljuWXj5dG30g Field0;
- TY__icTQkUhVkd9cEc0gJ9c2VwPg Field1;
- };
- typedef opencascade::handle<Aspect_DisplayConnection> TY__keu8dJZTmN1bTjmh2YTMeA;
- typedef opencascade::handle<OpenGl_GraphicDriver> TY__FZHdszn6vruH9aCoz9aCktYQ;
- typedef opencascade::handle<Graphic3d_GraphicDriver> TY__WzQHB9c9cwo6CTGferBwI78g;
- typedef opencascade::handle<V3d_Viewer> TY__47tV2K1aaSZXiNrxUNujaw;
- typedef opencascade::handle<Xw_Window> TY__LyS0CtE7Da8V9c3SncboSbA;
- typedef opencascade::handle<Aspect_Window> TY__yB86VfuSyzthqado7ziZgg;
- typedef NU8 tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A;
- typedef NU8 tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ;
- typedef N_NIMCALL_PTR(void, tyProc__ojoeKfW4VYIm36I9cpDTQIg) (void* p, NI op);
- typedef N_NIMCALL_PTR(void*, tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ) (void* p);
- struct TNimType {
- NI size;
- NI align;
- tyEnum_TNimKind__jIBKr1ejBgsfM33Kxw4j7A kind;
- tySet_tyEnum_TNimTypeFlag__v8QUszD1sWlSIWZz7mC4bQ flags;
- TNimType* base;
- TNimNode* node;
- void* finalizer;
- tyProc__ojoeKfW4VYIm36I9cpDTQIg marker;
- tyProc__WSm2xU5ARYv9aAR4l0z9c9auQ deepcopy;
- };
- struct RootObj {
- TNimType* m_type;
- };
- struct TGenericSeq {
- NI len;
- NI reserved;
- };
- struct NimStringDesc : public TGenericSeq {
- NIM_CHAR data[SEQ_DECL_SIZE];
- };
- struct Exception : public RootObj {
- Exception* parent;
- NCSTRING name;
- NimStringDesc* message;
- tySequence__uB9b75OUPRENsBAu4AnoePA* trace;
- Exception* up;
- };
- struct tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA : public Exception {
- };
- struct tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw : public tyObject_CatchableError__qrLSDoe2oBoAqNtJ9badtnA {
- };
- typedef NU8 tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ;
- struct TNimNode {
- tyEnum_TNimNodeKind__unfNsxrcATrufDZmpBq4HQ kind;
- NI offset;
- TNimType* typ;
- NCSTRING name;
- NI len;
- TNimNode** sons;
- };
- struct tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g {
- NI refcount;
- TNimType* typ;
- };
- struct tyObject_GcStack__7fytPA5bBsob6See21YMRA {
- void* bottom;
- };
- struct tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w {
- NI len;
- NI cap;
- tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g** d;
- };
- typedef tyObject_SmallChunk__tXn60W2f8h3jgAYdEmy5NQ* tyArray__SPr7N6UKfuF549bNPiUvSRw[256];
- typedef NU32 tyArray__BHbOSqU1t9b3Gt7K2c6fQig[24];
- typedef tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg* tyArray__N1u1nqOgmuJN9cSZrnMHgOQ[32];
- typedef tyArray__N1u1nqOgmuJN9cSZrnMHgOQ tyArray__B6durA4ZCi1xjJvRtyYxMg[24];
- typedef tyObject_Trunk__W0r8S0Y3UGke6T9bIUWnnuw* tyArray__lh2A89ahMmYg9bCmpVaplLbA[256];
- struct tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA {
- tyArray__lh2A89ahMmYg9bCmpVaplLbA data;
- };
- typedef tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* tyArray__0aOLqZchNi8nWtMTi8ND8w[2];
- struct tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw {
- tyArray__0aOLqZchNi8nWtMTi8ND8w link;
- NI key;
- NI upperBound;
- NI level;
- };
- struct tyTuple__ujsjpB2O9cjj3uDHsXbnSzg {
- tyObject_BigChunk__Rv9c70Uhp2TytkX7eH78qEg* Field0;
- NI Field1;
- };
- typedef tyTuple__ujsjpB2O9cjj3uDHsXbnSzg tyArray__LzOv2eCDGiceMKQstCLmhw[30];
- struct tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg {
- NI len;
- tyArray__LzOv2eCDGiceMKQstCLmhw chunks;
- tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg* next;
- };
- struct tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg {
- NI minLargeObj;
- NI maxLargeObj;
- tyArray__SPr7N6UKfuF549bNPiUvSRw freeSmallChunks;
- NU32 flBitmap;
- tyArray__BHbOSqU1t9b3Gt7K2c6fQig slBitmap;
- tyArray__B6durA4ZCi1xjJvRtyYxMg matrix;
- tyObject_LLChunk__XsENErzHIZV9bhvyJx56wGw* llmem;
- NI currMem;
- NI maxMem;
- NI freeMem;
- NI occ;
- NI lastSize;
- tyObject_IntSet__EZObFrE3NC9bIb3YMkY9crZA chunkStarts;
- tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* root;
- tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* deleted;
- tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* last;
- tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw* freeAvlNodes;
- NIM_BOOL locked;
- NIM_BOOL blockChunkSizeIncrease;
- NI nextChunkSize;
- tyObject_AvlNode__IaqjtwKhxLEpvDS9bct9blEw bottomData;
- tyObject_HeapLinks__PDV1HBZ8CQSQJC9aOBFNRSg heapLinks;
- };
- struct tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg {
- NI stackScans;
- NI cycleCollections;
- NI maxThreshold;
- NI maxStackSize;
- NI maxStackCells;
- NI cycleTableSize;
- NI64 maxPause;
- };
- struct tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ {
- NI counter;
- NI max;
- tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg* head;
- tyObject_PageDesc__fublkgIY4LG3mT51LU2WHg** data;
- };
- struct tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ {
- tyObject_GcStack__7fytPA5bBsob6See21YMRA stack;
- NI cycleThreshold;
- NI zctThreshold;
- tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w zct;
- tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w decStack;
- tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w tempStack;
- NI recGcLock;
- tyObject_MemRegion__x81NhDv59b8ercDZ9bi85jyg region;
- tyObject_GcStat__0RwLoVBHZPfUAcLczmfQAg stat;
- tyObject_CellSet__jG87P0AI9aZtss9ccTYBIISQ marked;
- tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w additionalRoots;
- NI gcThreadId;
- };
- typedef opencascade::handle<AIS_Shape> TY__0sNjvi6cy22LOUKb6aOHyA;
- typedef opencascade::handle<AIS_InteractiveObject> TY__9cLINH5i7M3YCUgLs46CBaA;
- struct tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA {
- NCSTRING procname;
- NI line;
- NCSTRING filename;
- };
- struct tySequence__uB9b75OUPRENsBAu4AnoePA : TGenericSeq {
- tyObject_StackTraceEntry__oLyohQ7O2XOvGnflOss8EA data[SEQ_DECL_SIZE];
- };
- N_LIB_PRIVATE N_NIMCALL(void, main__viewer4852_397)(void);
- static N_INLINE(void, nimZeroMem)(void* p, NI size);
- static N_INLINE(void, nimSetMem__systemZmemory_7)(void* a, int v, NI size);
- N_LIB_PRIVATE N_NIMCALL(tyTuple__mOcJMV5G9c4Xbhu28ljzjXA, getContextAndView__viewer4852_25)(void);
- N_LIB_PRIVATE N_NOINLINE(void*, newObj)(TNimType* typ, NI size);
- N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, copyStringRC1)(NimStringDesc* src);
- static N_INLINE(void, nimGCunrefNoCycle)(void* p);
- static N_INLINE(void, decRef__system_5358)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
- static N_INLINE(NI, minuspercent___system_716)(NI x, NI y);
- static N_INLINE(void, nimFrame)(TFrame* s);
- N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_2993)(void);
- static N_INLINE(void, popFrame)(void);
- static N_INLINE(NIM_BOOL, ltpercent___system_1005)(NI x, NI y);
- static N_INLINE(void, rtlAddZCT__system_5356)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
- N_LIB_PRIVATE N_NOINLINE(void, addZCT__system_5307)(tyObject_CellSeq__Axo1XVm9aaQueTOldv8le5w& s, tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
- static N_INLINE(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*, usrToCell__system_5313)(void* usr);
- static N_INLINE(void, asgnRef)(void** dest, void* src);
- static N_INLINE(void, incRef__system_5351)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c);
- static N_INLINE(NI, pluspercent___system_696)(NI x, NI y);
- N_LIB_PRIVATE N_NIMCALL(void, raiseExceptionEx)(Exception* e, NCSTRING ename, NCSTRING procname, NCSTRING filename, NI line);
- N_LIB_PRIVATE N_NIMCALL(TY__icTQkUhVkd9cEc0gJ9c2VwPg, view__viewer4852_21)(tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg* this_0);
- static N_INLINE(void, initStackBottomWith)(void* locals);
- N_LIB_PRIVATE N_NOINLINE(void, nimGC_setStackBottom)(void* theStackBottom);
- N_LIB_PRIVATE N_NIMCALL(void, systemDatInit000)(void);
- N_LIB_PRIVATE N_NIMCALL(void, systemInit000)(void);
- N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void);
- extern TNimType NTIrefvalueerror__Ie1m0dv1ZHg72IgPRr1cDw_;
- extern TNimType NTIvalueerror__yoNlBGx0D2tRizIdhQuENw_;
- STRING_LITERAL(TM__wD429azSPMakedXQ1XuV5lw_2, "Can\'t export null shape to STEP", 31);
- extern TFrame* framePtr__system_2564;
- extern TFrame* framePtr__system_2564;
- extern TFrame* framePtr__system_2564;
- extern TFrame* framePtr__system_2564;
- extern TFrame* framePtr__system_2564;
- extern TFrame* framePtr__system_2564;
- extern tyObject_GcHeap__1TRH1TZMaVZTnLNcIHuNFQ gch__system_5260;
- static N_INLINE(void, nimSetMem__systemZmemory_7)(void* a, int v, NI size) {
- void* T1_ = memset(a, v, ((size_t) (size)));
- }
- static N_INLINE(void, nimZeroMem)(void* p, NI size) {
- nimSetMem__systemZmemory_7(p, ((int) 0), size);
- }
- static N_INLINE(void, nimFrame)(TFrame* s) {
- {
- if (!(framePtr__system_2564 == ((TFrame*) NIM_NIL))) goto LA3_;
- { (*s).calldepth = ((NI16) 0);
- } }
- goto LA1_;
- LA3_: ;
- {
- (*s).calldepth = (NI16)((*framePtr__system_2564).calldepth + ((NI16) 1));
- }
- LA1_: ;
- (*s).prev = framePtr__system_2564;
- framePtr__system_2564 = s;
- {
- if (!((*s).calldepth == ((NI16) 2000))) goto LA8_;
- { callDepthLimitReached__system_2993();
- } }
- LA8_: ;
- }
- static N_INLINE(void, popFrame)(void) {
- framePtr__system_2564 = (*framePtr__system_2564).prev;
- }
- static N_INLINE(NI, minuspercent___system_716)(NI x, NI y) {
- NI result;
- nimfr_("-%", "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/arithmetics.nim");
- result = (NI)0;
- nimln_(414, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/arithmetics.nim");
- nimln_(418, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/arithmetics.nim");
- result = ((NI) ((NU)((NU64)(((NU) (x))) - (NU64)(((NU) (y))))));
- popFrame();
- return result;
- }
- static N_INLINE(NIM_BOOL, ltpercent___system_1005)(NI x, NI y) {
- NIM_BOOL result;
- nimfr_("<%", "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/comparisons.nim");
- result = (NIM_BOOL)0;
- nimln_(186, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/comparisons.nim");
- nimln_(188, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/comparisons.nim");
- result = ((NU64)(((NU) (x))) < (NU64)(((NU) (y))));
- popFrame();
- return result;
- }
- static N_INLINE(void, rtlAddZCT__system_5356)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
- nimfr_("rtlAddZCT", "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
- nimln_(243, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
- addZCT__system_5307(gch__system_5260.zct, c);
- popFrame();
- }
- static N_INLINE(void, decRef__system_5358)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
- nimfr_("decRef", "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
- nimln_(248, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
- (*c).refcount = minuspercent___system_716((*c).refcount, ((NI) 8));
- nimln_(249, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
- {
- NIM_BOOL T3_ = ltpercent___system_1005((*c).refcount, ((NI) 8));
- if (!T3_) goto LA4_;
- { nimln_(250, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
- rtlAddZCT__system_5356(c);
- } }
- LA4_: ;
- popFrame();
- }
- static N_INLINE(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*, usrToCell__system_5313)(void* usr) {
- tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* result;
- nimfr_("usrToCell", "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
- result = (tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*)0;
- nimln_(177, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
- NI T1_ = minuspercent___system_716(((NI) (ptrdiff_t) (usr)), ((NI) 16));
- result = ((tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g*) (T1_));
- popFrame();
- return result;
- }
- static N_INLINE(void, nimGCunrefNoCycle)(void* p) {
- nimfr_("nimGCunrefNoCycle", "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
- nimln_(276, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
- tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* T1_ = usrToCell__system_5313(p);
- decRef__system_5358(T1_);
- popFrame();
- }
- static N_INLINE(NI, pluspercent___system_696)(NI x, NI y) {
- NI result;
- nimfr_("+%", "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/arithmetics.nim");
- result = (NI)0;
- nimln_(403, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/arithmetics.nim");
- nimln_(407, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/arithmetics.nim");
- result = ((NI) ((NU)((NU64)(((NU) (x))) + (NU64)(((NU) (y))))));
- popFrame();
- return result;
- }
- static N_INLINE(void, incRef__system_5351)(tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* c) {
- nimfr_("incRef", "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
- nimln_(231, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
- (*c).refcount = pluspercent___system_696((*c).refcount, ((NI) 8));
- popFrame();
- }
- static N_INLINE(void, asgnRef)(void** dest, void* src) {
- nimfr_("asgnRef", "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
- nimln_(286, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
- {
- if (!!((src == NIM_NIL))) goto LA3_;
- { tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* T5_ = usrToCell__system_5313(src);
- incRef__system_5351(T5_);
- } }
- LA3_: ;
- nimln_(287, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
- {
- if (!!(((*dest) == NIM_NIL))) goto LA8_;
- { tyObject_Cell__1zcF9cV8XIAtbN8h5HRUB8g* T10_ = usrToCell__system_5313((*dest));
- decRef__system_5358(T10_);
- } }
- LA8_: ;
- nimln_(288, "/home/jose/.choosenim/toolchains/nim-1.6.6/lib/system/gc.nim");
- (*dest) = src;
- popFrame();
- }
- N_LIB_PRIVATE N_NIMCALL(tyTuple__mOcJMV5G9c4Xbhu28ljzjXA, getContextAndView__viewer4852_25)(void) {
- tyTuple__mOcJMV5G9c4Xbhu28ljzjXA result;
- nimfr_("getContextAndView", "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- { nimZeroMem((void*)(&result), sizeof(tyTuple__mOcJMV5G9c4Xbhu28ljzjXA));
- nimln_(27, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- TY__keu8dJZTmN1bTjmh2YTMeA aDisplay((new Aspect_DisplayConnection()));
- nimln_(28, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- TY__FZHdszn6vruH9aCoz9aCktYQ aDriverOpenGl((new OpenGl_GraphicDriver(aDisplay, NIM_TRUE)));
- nimln_(29, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- OpenGl_GraphicDriver* T1_ = aDriverOpenGl.get();
- TY__WzQHB9c9cwo6CTGferBwI78g aDriver(((Graphic3d_GraphicDriver*) (T1_)));
- nimln_(34, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- TY__47tV2K1aaSZXiNrxUNujaw aViewer((new V3d_Viewer(aDriver)));
- nimln_(35, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- (* aViewer).SetDefaultLights();
- nimln_(36, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- (* aViewer).SetLightOn();
- nimln_(39, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- TY__icTQkUhVkd9cEc0gJ9c2VwPg myView((new V3d_View(aViewer, ((V3d_TypeOfView) 0))));
- nimln_(40, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- TY__LyS0CtE7Da8V9c3SncboSbA aWindow((new Xw_Window(aDisplay, "OCCT Viewer", ((int) 100), ((int) 100), ((int) 512), ((int) 512))));
- nimln_(41, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- Xw_Window* T2_ = aWindow.get();
- TY__yB86VfuSyzthqado7ziZgg aWinAspect(((Aspect_Window*) (T2_)));
- nimln_(43, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- (* myView).SetWindow(aWinAspect, NIM_NIL);
- nimln_(44, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- (* myView).SetBackgroundColor(Quantity_Color(((Quantity_NameOfColor) 182)));
- nimln_(45, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- (* myView).TriedronDisplay(((Aspect_TypeOfTriedronPosition) 6), Quantity_Color(((Quantity_NameOfColor) 508)), 0.1f, ((V3d_TypeOfVisualization) 0));
- nimln_(46, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- (* myView).ChangeRenderingParams().RenderResolutionScale = 2.0f;
- nimln_(49, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- TY__U9azJ3jnkWQljuWXj5dG30g myContext((new AIS_InteractiveContext(aViewer)));
- nimln_(52, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- BRepPrimAPI_MakeBox mybox(1.0f, 2.0f, 3.0f);
- nimln_(53, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- mybox.Build();
- nimln_(54, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- TopoDS_Solid solid = mybox.Solid();
- nimln_(55, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- {
- tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw* T7_;
- NimStringDesc* T8_;
- if (!solid.IsNull()) goto LA5_;
- { T7_ = NIM_NIL;
- T7_ = (tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw*) newObj((&NTIrefvalueerror__Ie1m0dv1ZHg72IgPRr1cDw_), sizeof(tyObject_ValueError__yoNlBGx0D2tRizIdhQuENw));
- (*T7_).m_type = (&NTIvalueerror__yoNlBGx0D2tRizIdhQuENw_);
- (*T7_).name = "ValueError";
- T8_ = NIM_NIL;
- T8_ = (*T7_).message; (*T7_).message = copyStringRC1(((NimStringDesc*) &TM__wD429azSPMakedXQ1XuV5lw_2));
- if (T8_) nimGCunrefNoCycle(T8_);
- asgnRef((void**) (&(*T7_).parent), ((Exception*) NIM_NIL));
- nimln_(56, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- raiseExceptionEx((Exception*)T7_, "ValueError", "getContextAndView", "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim", 56);
- } }
- LA5_: ;
- nimln_(58, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- TopoDS_Shape aShape = solid;
- nimln_(59, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- TY__0sNjvi6cy22LOUKb6aOHyA aShapeAis((new AIS_Shape(aShape)));
- nimln_(60, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- AIS_Shape* T9_ = aShapeAis.get();
- TY__9cLINH5i7M3YCUgLs46CBaA aShapePrs(((AIS_InteractiveObject*) (T9_)));
- nimln_(61, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- (* myContext).Display(aShapeAis, ((int) 1), ((int) 0), NIM_FALSE, ((AIS_DisplayStatus) 2));
- nimln_(62, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- (* myView).FitAll(0.01f, NIM_FALSE);
- nimln_(64, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- (* aWindow).Map();
- nimln_(65, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- (* myView).Redraw();
- nimln_(66, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- TY__U9azJ3jnkWQljuWXj5dG30g colontmp_ = myContext;
- TY__icTQkUhVkd9cEc0gJ9c2VwPg colontmp__2 = myView;
- result.Field0 = colontmp_;
- result.Field1 = colontmp__2;
- goto BeforeRet_;
- }BeforeRet_: ;
- popFrame();
- return result;
- }
- N_LIB_PRIVATE N_NIMCALL(TY__icTQkUhVkd9cEc0gJ9c2VwPg, view__viewer4852_21)(tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg* this_0) {
- TY__icTQkUhVkd9cEc0gJ9c2VwPg result;
- nimfr_("view", "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- { nimln_(19, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- result = (*this_0).myView;
- goto BeforeRet_;
- }BeforeRet_: ;
- popFrame();
- return result;
- }
- N_LIB_PRIVATE N_NIMCALL(void, main__viewer4852_397)(void) {
- tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg aViewer;
- nimfr_("main", "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- nimZeroMem((void*)(&aViewer), sizeof(tyObject_OcctAisHello__4FfLiMkIhaAMoZFVAV19cSg));
- nimln_(74, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- tyTuple__mOcJMV5G9c4Xbhu28ljzjXA T1_ = getContextAndView__viewer4852_25();
- tyTuple__mOcJMV5G9c4Xbhu28ljzjXA _ = T1_;
- aViewer.myContext = _.Field0;
- aViewer.myView = _.Field1;
- nimln_(76, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- TY__icTQkUhVkd9cEc0gJ9c2VwPg T2_ = view__viewer4852_21((&aViewer));
- Aspect_Window* T3_ = (* T2_).Window().get();
- TY__LyS0CtE7Da8V9c3SncboSbA aWindow(((Xw_Window*) (T3_)));
- nimln_(78, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- TY__icTQkUhVkd9cEc0gJ9c2VwPg T4_ = view__viewer4852_21((&aViewer));
- TY__keu8dJZTmN1bTjmh2YTMeA aDispConn = (* (* (* T4_).Viewer()).Driver()).GetDisplayConnection();
- {
- nimln_(81, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- while (1) {
- }
- }
- popFrame();
- }
- static N_INLINE(void, initStackBottomWith)(void* locals) {
- nimGC_setStackBottom(locals);
- }
- N_LIB_PRIVATE void PreMainInner(void) {
- }
- N_LIB_PRIVATE int cmdCount;
- N_LIB_PRIVATE char** cmdLine;
- N_LIB_PRIVATE char** gEnv;
- N_LIB_PRIVATE void PreMain(void) {
- void (*volatile inner)(void);
- inner = PreMainInner;
- systemDatInit000();
- initStackBottomWith((void *)&inner);
- systemInit000();
- (*inner)();
- }
- N_LIB_PRIVATE N_CDECL(void, NimMainInner)(void) {
- NimMainModule();
- }
- N_CDECL(void, NimMain)(void) {
- void (*volatile inner)(void);
- PreMain();
- inner = NimMainInner;
- initStackBottomWith((void *)&inner);
- (*inner)();
- }
- int main(int argc, char** args, char** env) {
- cmdLine = args;
- cmdCount = argc;
- gEnv = env;
- NimMain();
- return nim_program_result;
- }
- N_LIB_PRIVATE N_NIMCALL(void, NimMainModule)(void) {
- {
- nimfr_("viewer04", "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- nimln_(84, "/home/jose/src/nimlang/occt.nim/examples/viewer04.nim");
- main__viewer4852_397();
- popFrame();
- }
- }
Add Comment
Please, Sign In to add comment