Home
Reply
Contributor
amcom
Posts: 7

Problem for a simple project?

Hello,

 

I am new to Interop and trying to convert CAD file from other formats to IGES format. My simple project is like below. According to http://doc.spatial.com/index.php/InterOp:Connect , I should be able to convert CAD from file to file. But my project always fails. So my questions are

 

1. Is there any problem with my code? If I change the dst file to a.sat, it will be running OK.

2. At the end of debug run, there is memory leak. Is this an issue?

 

Thanks a lot. Attached is the file a.stp.

 

int main()
{
  api_start_modeller(0);
  unlock_license();


  SPAIConverter converter;
  SPAIDocument src( "D:\\projects\\part\\sample_cad_files\\a.stp" );
  SPAIDocument dst( "D:\\projects\\part\\sample_cad_files\\a.igs" );
  SPAIFile          logFile1( "D:\\projects\\part\\sample_cad_files\\a.txt" );
  converter.StartLog( logFile1 );
  converter.Convert( src, dst );
  converter.StopLog( logFile1 );

 

  api_stop_modeller();
  return 0;
}

Spatial Moderator
ybiyani
Posts: 223

Re: Problem for a simple project?

Hello amcom.

 

Direct STEP->IGS translation is not possible. You will have to add an intermediate step i.e. first translate STEP->SAT and then SAT->IGS to achieve the desired result.

 

Regards,

Yogesh

Contributor
amcom
Posts: 7

Re: Problem for a simple project?

Thanks for the reply.

 

Now I run the project two times. First time, I converted stp to sat with no problem (other than some memory leak). Second time, I converted the sat to igs. I got a message box on the screen, saying "This application has requested the runtime to terminate it in an unusual way. Please contact the application's support term for more information."

 

I then clicked "Ignore" and got a lot of memory leaks. The dumping takes about 1~2 minutes to be finished. However, the igs file was still generated.

 

Could anybody help for this? I really appreciate.

 

BTW, I am using Visual Studio 2005.

1.jpg
Spatial Moderator
ybiyani
Posts: 223

Re: Problem for a simple project?

Hello amcom,

 

1) Please note Spatial supports VS 2005 SP1 - http://doc.spatial.com/index.php/Compiler_Flags_and_Preprocessor_Directives

2) What is the behavior with the samples provided in the InterOp products (http://doc.spatial.com/index.php/InterOp:Connect/Using_Samples) ? Please try sample "Simple" to see if you still see the same behavior.

 

Regards,

Yogesh

Contributor
amcom
Posts: 7

Re: Problem for a simple project?

Yogesh, thank you for the help.

 

I was struggling with the VS 2005 settings from the link, mostly the Linker Options. The problems are

 

/LIB -- warning, unrecognized

/DEF: -- error, no argument specified

/NODEFAULTLIB -- a lot of link errors.

 

So I have to remove these options. For Compiler Flags, I didn't have SPA_NO_AUTO_LINK before and now I added it. The test results are,

 

stp to sat -- can finish conversion, no memory leak

catpart to sat (simple sample) -- can finish conversion, some memory leak

sat to ige -- the message box "Debug Error!" still showing up. If ignore, can finish conversion and no memory leak.

 

Do you have any idea about this? Thanks.  

 

 

Spatial Moderator
ybiyani
Posts: 223

Re: Problem for a simple project?

Hello amcom,

 

 

1) Did you try the standard sample?Are these test results with the standard InterOp sample?

 

2) The memory leak you are experiencing may be false memory leaks - http://doc.spatial.com/index.php/Understanding_False_Memory_Leak_Reported_in_ACIS-based_MFC_Applicat...

 

3) Have you installed the VC runtimes

http://doc.spatial.com/index.php/ACIS_Release_Notes/Installation_Notes#Important_Runtime_Installatio... 

 

If the above still does not explain the behavior please create an incident with the support for further analysis.

 

Regards,

Yogesh