---------- InitOcct ---------- Initialize Open Cascade.
| 173 | // Initialize Open Cascade. |
| 174 | // |
| 175 | void |
| 176 | InitOcct() |
| 177 | { |
| 178 | Handle(XCAFApp_Application) OCCTManager = static_cast<XCAFApp_Application*>(gOCCTManager); |
| 179 | OCCTManager = XCAFApp_Application::GetApplication(); |
| 180 | Handle(TDocStd_Document) doc; |
| 181 | OCCTManager->NewDocument("MDTV-XCAF", doc); |
| 182 | |
| 183 | if (!XCAFDoc_DocumentTool::IsXCAFDocument(doc)) { |
| 184 | fprintf(stdout,"OCCT XDE is not setup correctly, file i/o and register of solid will not work correctly.\n"); |
| 185 | } |
| 186 | //printf("%-12s %s\n","[InitOcct] Python API OpenCASCADE version:", OCC_VERSION_COMPLETE); |
| 187 | |
| 188 | // Register the file extensions: brep, step, iges and stl. |
| 189 | auto registerFunction = new sv4guiRegisterOCCTFunction(); |
| 190 | } |
| 191 | |
| 192 |