mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0026500: Add the possibility to save only part of shapes from XCAF document in IGES/STEP writers
Added public methods for specified labels (shapes) transfer in IGES/STEP writers.
This commit is contained in:
@@ -288,9 +288,9 @@ IFSelect_ReturnStatus STEPCAFControl_Writer::Write (const Standard_CString filen
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean STEPCAFControl_Writer::Transfer (const Handle(TDocStd_Document) &doc,
|
||||
Standard_Boolean STEPCAFControl_Writer::Transfer( const Handle(TDocStd_Document) &doc,
|
||||
const STEPControl_StepModelType mode,
|
||||
const Standard_CString multi)
|
||||
const Standard_CString multi )
|
||||
{
|
||||
Handle(XCAFDoc_ShapeTool) STool = XCAFDoc_DocumentTool::ShapeTool( doc->Main() );
|
||||
if ( STool.IsNull() ) return Standard_False;
|
||||
@@ -306,15 +306,26 @@ Standard_Boolean STEPCAFControl_Writer::Transfer (const Handle(TDocStd_Document)
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean STEPCAFControl_Writer::Transfer (const TDF_Label &L,
|
||||
Standard_Boolean STEPCAFControl_Writer::Transfer( const TDF_Label& L,
|
||||
const STEPControl_StepModelType mode,
|
||||
const Standard_CString multi)
|
||||
const Standard_CString multi )
|
||||
{
|
||||
TDF_LabelSequence labels;
|
||||
labels.Append ( L );
|
||||
return Transfer ( myWriter, labels, mode, multi );
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Transfer
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
Standard_Boolean STEPCAFControl_Writer::Transfer( const TDF_LabelSequence& labels,
|
||||
const STEPControl_StepModelType mode,
|
||||
const Standard_CString multi )
|
||||
{
|
||||
return Transfer( myWriter, labels, mode, multi );
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Perform
|
||||
|
@@ -73,16 +73,16 @@ public:
|
||||
//! Provided for use like single-file writer
|
||||
Standard_EXPORT IFSelect_ReturnStatus Write (const Standard_CString filename);
|
||||
|
||||
Standard_EXPORT Standard_Boolean Transfer (const Handle(TDocStd_Document)& doc, const STEPControl_StepModelType mode = STEPControl_AsIs, const Standard_CString multi = 0);
|
||||
|
||||
//! Transfers a document (or single label) to a STEP model
|
||||
//! The mode of translation of shape is AsIs
|
||||
//! If multi is not null pointer, it switches to multifile
|
||||
//! mode (with external refs), and string pointed by <multi>
|
||||
//! gives prefix for names of extern files (can be empty string)
|
||||
//! Returns True if translation is OK
|
||||
Standard_EXPORT Standard_Boolean Transfer (const Handle(TDocStd_Document)& doc, const STEPControl_StepModelType mode = STEPControl_AsIs, const Standard_CString multi = 0);
|
||||
Standard_EXPORT Standard_Boolean Transfer (const TDF_LabelSequence& L, const STEPControl_StepModelType mode = STEPControl_AsIs, const Standard_CString multi = 0);
|
||||
Standard_EXPORT Standard_Boolean Transfer (const TDF_Label& L, const STEPControl_StepModelType mode = STEPControl_AsIs, const Standard_CString multi = 0);
|
||||
|
||||
|
||||
Standard_EXPORT Standard_Boolean Perform (const Handle(TDocStd_Document)& doc, const TCollection_AsciiString& filename);
|
||||
|
||||
//! Transfers a document and writes it to a STEP file
|
||||
|
Reference in New Issue
Block a user