| 582 | } |
| 583 | |
| 584 | void readFile(const char* FileName, int iLods) |
| 585 | { |
| 586 | iLod = iLods; |
| 587 | |
| 588 | testLicence(); |
| 589 | |
| 590 | JtkCADImporter* importer = NULL; |
| 591 | importer = JtkEntityFactory::createCADImporter(); |
| 592 | if (importer) { |
| 593 | importer->ref(); |
| 594 | importer->setShapeLoadOption(JtkCADImporter::JtkALL_LODS); |
| 595 | importer->setBrepLoadOption(JtkCADImporter::JtkTESS_AND_BREP); |
| 596 | JtkHierarchy* root = NULL; |
| 597 | |
| 598 | root = importer->import(FileName); |
| 599 | |
| 600 | if (root) { |
| 601 | root->ref(); |
| 602 | JtkTraverser* trav = JtkEntityFactory::createTraverser(); |
| 603 | trav->setupPreActionCallback(myPreactionCB_CollectFacets); |
| 604 | if (trav) { |
| 605 | trav->ref(); |
| 606 | trav->traverseGraph(root); |
| 607 | trav->unref(); |
| 608 | trav = NULL; |
| 609 | } |
| 610 | else { |
| 611 | throw "Unable to create JtkTraverser.\n"; |
| 612 | } |
| 613 | |
| 614 | root->unref(); |
| 615 | root = NULL; |
| 616 | } |
| 617 | else { |
| 618 | throw "Unable in find root node. Check file...\n"; |
| 619 | } |
| 620 | |
| 621 | importer->unref(); |
| 622 | importer = NULL; |
| 623 | } |
| 624 | else { |
| 625 | throw "Unable to create JtkCADImporter. Check license...\n"; |
| 626 | } |
| 627 | } |
| 628 | |
| 629 | |
| 630 | const SimpleMeshFacet* iterStart(void) |
no test coverage detected