Open CASCADE Technology
6.5.4
|
Provides a tool to write DECAF document to the
IGES file. Besides transfer of shapes (including
assemblies) provided by IGESControl, supports also
colors and part names
IGESCAFControl_Writer writer();
Methods for writing IGES file:
writer.Transfer (Document);
writer.Write("filename") or writer.Write(OStream) or
writer.Perform(Document,"filename");
Methods for managing the writing of attributes.
Colors
writer.SetColorMode(colormode);
Standard_Boolean colormode = writer.GetColorMode();
Layers
writer.SetLayerMode(layermode);
Standard_Boolean layermode = writer.GetLayerMode();
Names
writer.SetNameMode(namemode);
Standard_Boolean namemode = writer.GetNameMode();
#include <IGESCAFControl_Writer.hxx>
Public Member Functions | |
DEFINE_STANDARD_ALLOC | IGESCAFControl_Writer () |
Creates a writer with an empty IGES model and sets ColorMode, LayerMode and NameMode to Standard_True. | |
IGESCAFControl_Writer (const Handle< XSControl_WorkSession > &WS, const Standard_Boolean scratch=Standard_True) | |
Creates a reader tool and attaches it to an already existing Session Clears the session if it was not yet set for IGES | |
Standard_Boolean | Transfer (const Handle< TDocStd_Document > &doc) |
Transfers a document to a IGES model Returns True if translation is OK | |
Standard_Boolean | Perform (const Handle< TDocStd_Document > &doc, const TCollection_AsciiString &filename) |
Standard_Boolean | Perform (const Handle< TDocStd_Document > &doc, const Standard_CString filename) |
Transfers a document and writes it to a IGES file Returns True if translation is OK | |
void | SetColorMode (const Standard_Boolean colormode) |
Set ColorMode for indicate write Colors or not. | |
Standard_Boolean | GetColorMode () const |
void | SetNameMode (const Standard_Boolean namemode) |
Set NameMode for indicate write Name or not. | |
Standard_Boolean | GetNameMode () const |
void | SetLayerMode (const Standard_Boolean layermode) |
Set LayerMode for indicate write Layers or not. | |
Standard_Boolean | GetLayerMode () const |
Protected Member Functions | |
Standard_Boolean | WriteAttributes (const Handle< TDocStd_Document > &doc) |
Reads colors from DECAF document and assigns them to corresponding IGES entities | |
Standard_Boolean | WriteLayers (const Handle< TDocStd_Document > &doc) |
Reads layers from DECAF document and assigns them to corresponding IGES entities | |
Standard_Boolean | WriteNames (const Handle< TDocStd_Document > &doc) |
Recursivile iterates on subshapes and assign names to IGES entity |
IGESCAFControl_Writer::IGESCAFControl_Writer | ( | const Handle< XSControl_WorkSession > & | WS, |
const Standard_Boolean | scratch = Standard_True |
||
) |
Standard_Boolean IGESCAFControl_Writer::Perform | ( | const Handle< TDocStd_Document > & | doc, |
const TCollection_AsciiString & | filename | ||
) |
Standard_Boolean IGESCAFControl_Writer::Perform | ( | const Handle< TDocStd_Document > & | doc, |
const Standard_CString | filename | ||
) |
void IGESCAFControl_Writer::SetColorMode | ( | const Standard_Boolean | colormode | ) |
void IGESCAFControl_Writer::SetLayerMode | ( | const Standard_Boolean | layermode | ) |
void IGESCAFControl_Writer::SetNameMode | ( | const Standard_Boolean | namemode | ) |
Standard_Boolean IGESCAFControl_Writer::WriteAttributes | ( | const Handle< TDocStd_Document > & | doc | ) | [protected] |
Standard_Boolean IGESCAFControl_Writer::WriteLayers | ( | const Handle< TDocStd_Document > & | doc | ) | [protected] |
Standard_Boolean IGESCAFControl_Writer::WriteNames | ( | const Handle< TDocStd_Document > & | doc | ) | [protected] |