[MOAB-dev] Problems with ReadCGM

Steve Jackson sjackson at cae.wisc.edu
Mon Oct 26 17:50:36 CDT 2009


I have an issue with ReadCGM that's been puzzling me for a couple of  
days.  Perhaps someone on this list can help me determine the problem.

Below is a simple program that loads an acis .sat geometry into MOAB.   
When MOAB is compiled with an acis-based CGM, the code below works  
fine.  However, when MOAB is compiled against a cubit-based CGM, the  
code below fails.

> #include "MBCore.hpp"
> #include <iostream>
>
> int main(){
>
>   MBErrorCode rval;
>   MBEntityHandle file_set;
>   MBCore* MBI = new MBCore();
>
>   rval = MBI->load_file("geom.sat", file_set, "", NULL, 0, 0);
>   if (MB_SUCCESS != rval) {
>     std::cerr << "Couldn't read file. " << std::endl;
>     return rval;
>   }
>
>   return 0;
> }


The initial failure occurs in ReadCGM::load_file, at line 393 of  
ReadCGM.cpp.  The first call to gqe->get_graphics() produces an error  
message (below) and returns failure.  This in turn causes  
ReadCGM::load_file() to fail.

The error message produced within the get_graphics() call is:

> ERROR: In AcisQueryEngine::get_Body
>        Body is not a BodyACIS.

Note that get_graphics() is being called with a Curve object, not a  
Body.

The error happens predictably and seems to occur with any .sat file I  
provide.  My CGM is built against Cubit 10.22, and MOAB is the latest  
revision from SVN.  I also tried compiling MOAB with svn revision  
3005, just before the last major revision to ReadCGM.cpp, but got the  
same error.

Has anyone encountered this issue before?

Thanks,
~S



More information about the moab-dev mailing list