Changeset 3276
- Timestamp:
- 11/03/09 15:38:19 (3 weeks ago)
- Files:
-
- 1 modified
-
MOAB/trunk/ReadCGM.cpp (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
MOAB/trunk/ReadCGM.cpp
r3241 r3276 18 18 19 19 #include "GeometryQueryTool.hpp" 20 #include "GeometryQueryEngine.hpp"21 20 #include "ModelQueryEngine.hpp" 22 21 #include "RefEntityName.hpp" … … 388 387 RefEdge* edge = dynamic_cast<RefEdge*>(ci->first); 389 388 Curve* curve = edge->get_curve_ptr(); 390 GeometryQueryEngine* gqe = curve->get_geometry_query_engine();391 389 data.clean_out(); 392 int count; 393 CubitStatus s = gqe->get_graphics( curve, count, &data, faceting_tol); 390 edge->get_graphics( data, faceting_tol); 394 391 if (CUBIT_SUCCESS != s) 395 392 return MB_FAILURE; … … 412 409 // Special case for point curve 413 410 if (points.size() < 2) { 414 if (start_vtx != end_vtx || curve->measure() > gqe->get_sme_resabs_tolerance()) {411 if (start_vtx != end_vtx || curve->measure() > GEOMETRY_RESABS ) { 415 412 std::cerr << "Warning: No facetting for curve " << edge->id() << std::endl; 416 413 continue; … … 423 420 } 424 421 425 const bool closed = (points.front() - points.back()).length() < gqe->get_sme_resabs_tolerance();422 const bool closed = (points.front() - points.back()).length() < GEOMETRY_RESABS; 426 423 if (closed != (start_vtx == end_vtx)) { 427 424 std::cerr << "Warning: topology and geometry inconsistant for possibly closed curve " … … 430 427 431 428 // check proximity of vertices to end coordinates 432 if ((start_vtx->coordinates() - points.front()).length() > gqe->get_sme_resabs_tolerance()433 || ( end_vtx->coordinates() - points.back() ).length() > gqe->get_sme_resabs_tolerance()) {429 if ((start_vtx->coordinates() - points.front()).length() > GEOMETRY_RESABS 430 || ( end_vtx->coordinates() - points.back() ).length() > GEOMETRY_RESABS ) { 434 431 std::cerr << "Warning: vertices not at ends of curve " << edge->id() << std::endl; 435 432 } … … 472 469 for (ci = entmap[2].begin(); ci != entmap[2].end(); ++ci) { 473 470 RefFace* face = dynamic_cast<RefFace*>(ci->first); 474 Surface* surf = face->get_surface_ptr(); 475 GeometryQueryEngine* gqe = surf->get_geometry_query_engine(); 471 476 472 data.clean_out(); 477 int nt, np, nf; 478 CubitStatus s = gqe->get_graphics( surf, nt, np, nf, &data, 479 norm_tol, faceting_tol, len_tol); 473 CubitStatus s = face->get_graphics( data, norm_tol, faceting_tol, len_tol ); 474 480 475 if (CUBIT_SUCCESS != s) 481 476 return MB_FAILURE; … … 497 492 data.point_list()[j].y, 498 493 data.point_list()[j].z ); 499 if ((pos - vpos).length_squared() < gqe->get_sme_resabs_tolerance()*gqe->get_sme_resabs_tolerance()) {494 if ((pos - vpos).length_squared() < GEOMETRY_RESABS*GEOMETRY_RESABS ) { 500 495 if (verts[j]) 501 496 std::cerr << "Warning: Coincident vertices in surface " << face->id() << std::endl;
![(please configure the [header_logo] section in trac.ini)](/projects/ITAPS/chrome/common/trac_banner.png)