- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic to the Top
- Bookmark
- Subscribe
- Printer Friendly Page
New InputForma t->ACIS->P arasolid translatio n flow - are SPAIConver ter objects reusable?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
06-08-2010 02:57 AM
I am reworking my translation in the light of the introduction of the InputFormat->ACIS->Parasolid translation flow.
I have two versions of the new code, but each has problems.
Version 1 uses two SPAIConverter objects:
SPAIDocument ACISFile( strTempFile ); // ACISFile is a temp file with extension .sab
SPAIConverter ConverterToACIS;
ConverterToACIS.SetProgressCallback( InterOp_ProgressCallback );
ConverterToACIS.StartLog( ACISLogFile );
Result = ConverterToACIS.Convert ( SourceFile, ACISFile );
ConverterToACIS.StopLog( ACISLogFile );
SPAIGenericDocument ParasolidFile;
SPAIConverter ConverterToParasolid;
ConverterToParasolid.SetProgressCallback( InterOp_ProgressCallback );
ConverterToParasolid.StartLog( ParasolidLogFile );
Result = ConverterToParasolid.Convert ( ACISFile, ParasolidFile );
ConverterToParasolid.StopLog( ParasolidLogFile );
This works, but I now have two log files and this is not desired.
So, version 2 uses a single SPAIConverter:
SPAIConverter Converter;
Converter.SetProgressCallback( InterOp_ProgressCallback );
Converter.StartLog( ACISLogFile );
Result = Converter.Convert ( SourceFile, ACISFile ); // ACISFile is a temp file with extension .sab
SPAIGenericDocument ParasolidFile;
Result = Converter.Convert ( ACISFile, ParasolidFile );
Converter.StopLog( ParasolidLogFile );
This also works and I have a single logfile for the two-stage translation. However, the callback to InterOp_ProgressCallback is not made for the second conversion, so I cannot determine progress. This is not desired.
This second problem – the lack of callbacks during translation – makes me wonder whether it is a good idea to reuse a convertor. What other state might be persisted by an instance of a SPAIConverter, making suspect the second and subsequent conversions it performs?
Senior Software Engineer
Renishaw PLC
T +44 (0)1453 524764
F +44 (0)1453 523201
E paul.scully@renishaw.com
www.renishaw.com
Re: New InputForma t->ACIS->P arasolid translatio n flow - are SPAIConver ter objects reusable?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
06-16-2010 09:44 AM
Hello Paul,
We test one translation at a time -So this is an unknown. If you would like to reuse the objects and encounter issue please log them as support incidents so that we can review this further.
Regards,
Yogesh
Re: New InputForma t->ACIS->P arasolid translatio n flow - are SPAIConver ter objects reusable?
- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content
06-22-2010 02:56 AM
Thanks, Yogesh.
I will log a report. It seems I must live with two log files for now, which involves changing more code to accommodate the new workflow.
It's never quite (quote) "a fairly simple change in your code" - yes the changes are simple, but the ramifications of behavioural changes are not =)
Senior Software Engineer
Renishaw PLC
T +44 (0)1453 524764
F +44 (0)1453 523201
E paul.scully@renishaw.com
www.renishaw.com

