mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
Coding - Apply .clang-format formatting #286
Update empty method guards to new style with regex (see PR). Used clang-format 18.1.8. New actions to validate code formatting is added. Update .clang-format with disabling of include sorting. It is temporary changes, then include will be sorted. Apply formatting for /src and /tools folder. The files with .hxx,.cxx,.lxx,.h,.pxx,.hpp,*.cpp extensions.
This commit is contained in:
@@ -13,60 +13,48 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#include <STEPCAFControl_ActorWrite.hxx>
|
||||
#include <TopoDS_Shape.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(STEPCAFControl_ActorWrite,STEPControl_ActorWrite)
|
||||
IMPLEMENT_STANDARD_RTTIEXT(STEPCAFControl_ActorWrite, STEPControl_ActorWrite)
|
||||
|
||||
//=======================================================================
|
||||
//function : STEPCAFControl_ActorWrite
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
STEPCAFControl_ActorWrite::STEPCAFControl_ActorWrite () : myStdMode(Standard_True)
|
||||
//=================================================================================================
|
||||
|
||||
STEPCAFControl_ActorWrite::STEPCAFControl_ActorWrite()
|
||||
: myStdMode(Standard_True)
|
||||
{
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ClearMap
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
//=================================================================================================
|
||||
|
||||
void STEPCAFControl_ActorWrite::SetStdMode (const Standard_Boolean stdmode)
|
||||
void STEPCAFControl_ActorWrite::SetStdMode(const Standard_Boolean stdmode)
|
||||
{
|
||||
myStdMode = stdmode;
|
||||
if ( myStdMode ) ClearMap();
|
||||
if (myStdMode)
|
||||
ClearMap();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : ClearMap
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
//=================================================================================================
|
||||
|
||||
void STEPCAFControl_ActorWrite::ClearMap ()
|
||||
void STEPCAFControl_ActorWrite::ClearMap()
|
||||
{
|
||||
myMap.Clear();
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : RegisterAssembly
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
//=================================================================================================
|
||||
|
||||
void STEPCAFControl_ActorWrite::RegisterAssembly (const TopoDS_Shape &S)
|
||||
void STEPCAFControl_ActorWrite::RegisterAssembly(const TopoDS_Shape& S)
|
||||
{
|
||||
if ( ! myStdMode && S.ShapeType() == TopAbs_COMPOUND ) myMap.Add ( S );
|
||||
if (!myStdMode && S.ShapeType() == TopAbs_COMPOUND)
|
||||
myMap.Add(S);
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : IsAssembly
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
//=================================================================================================
|
||||
|
||||
Standard_Boolean STEPCAFControl_ActorWrite::IsAssembly (const Handle(StepData_StepModel)& theModel,
|
||||
TopoDS_Shape &S) const
|
||||
Standard_Boolean STEPCAFControl_ActorWrite::IsAssembly(const Handle(StepData_StepModel)& theModel,
|
||||
TopoDS_Shape& S) const
|
||||
{
|
||||
if ( myStdMode ) return STEPControl_ActorWrite::IsAssembly ( theModel, S );
|
||||
return myMap.Contains ( S );
|
||||
if (myStdMode)
|
||||
return STEPControl_ActorWrite::IsAssembly(theModel, S);
|
||||
return myMap.Contains(S);
|
||||
}
|
||||
|
||||
|
@@ -23,7 +23,6 @@
|
||||
#include <STEPControl_ActorWrite.hxx>
|
||||
class TopoDS_Shape;
|
||||
|
||||
|
||||
class STEPCAFControl_ActorWrite;
|
||||
DEFINE_STANDARD_HANDLE(STEPCAFControl_ActorWrite, STEPControl_ActorWrite)
|
||||
|
||||
@@ -33,50 +32,31 @@ class STEPCAFControl_ActorWrite : public STEPControl_ActorWrite
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
Standard_EXPORT STEPCAFControl_ActorWrite();
|
||||
|
||||
|
||||
//! Check whether shape S is assembly
|
||||
//! Returns True if shape is registered in assemblies map
|
||||
Standard_EXPORT virtual Standard_Boolean IsAssembly (const Handle(StepData_StepModel)& theModel,
|
||||
TopoDS_Shape& S) const Standard_OVERRIDE;
|
||||
|
||||
Standard_EXPORT virtual Standard_Boolean IsAssembly(const Handle(StepData_StepModel)& theModel,
|
||||
TopoDS_Shape& S) const Standard_OVERRIDE;
|
||||
|
||||
//! Set standard mode of work
|
||||
//! In standard mode Actor (default) behaves exactly as its
|
||||
//! ancestor, also map is cleared
|
||||
Standard_EXPORT void SetStdMode (const Standard_Boolean stdmode = Standard_True);
|
||||
|
||||
Standard_EXPORT void SetStdMode(const Standard_Boolean stdmode = Standard_True);
|
||||
|
||||
//! Clears map of shapes registered as assemblies
|
||||
Standard_EXPORT void ClearMap();
|
||||
|
||||
|
||||
//! Registers shape to be written as assembly
|
||||
//! The shape should be TopoDS_Compound (else does nothing)
|
||||
Standard_EXPORT void RegisterAssembly (const TopoDS_Shape& S);
|
||||
Standard_EXPORT void RegisterAssembly(const TopoDS_Shape& S);
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(STEPCAFControl_ActorWrite,STEPControl_ActorWrite)
|
||||
DEFINE_STANDARD_RTTIEXT(STEPCAFControl_ActorWrite, STEPControl_ActorWrite)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Standard_Boolean myStdMode;
|
||||
Standard_Boolean myStdMode;
|
||||
TopTools_MapOfShape myMap;
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _STEPCAFControl_ActorWrite_HeaderFile
|
||||
|
@@ -13,37 +13,32 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#include <Interface_Static.hxx>
|
||||
#include <Standard_Type.hxx>
|
||||
#include <STEPCAFControl_ActorWrite.hxx>
|
||||
#include <STEPCAFControl_Controller.hxx>
|
||||
#include <XSAlgo.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(STEPCAFControl_Controller,STEPControl_Controller)
|
||||
IMPLEMENT_STANDARD_RTTIEXT(STEPCAFControl_Controller, STEPControl_Controller)
|
||||
|
||||
//=======================================================================
|
||||
//function : STEPCAFControl_Controller
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
STEPCAFControl_Controller::STEPCAFControl_Controller ()
|
||||
//=================================================================================================
|
||||
|
||||
STEPCAFControl_Controller::STEPCAFControl_Controller()
|
||||
{
|
||||
Handle(STEPCAFControl_ActorWrite) ActWrite = new STEPCAFControl_ActorWrite;
|
||||
myAdaptorWrite = ActWrite;
|
||||
myAdaptorWrite = ActWrite;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : Init
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
//=================================================================================================
|
||||
|
||||
Standard_Boolean STEPCAFControl_Controller::Init ()
|
||||
Standard_Boolean STEPCAFControl_Controller::Init()
|
||||
{
|
||||
static Standard_Mutex theMutex;
|
||||
{
|
||||
Standard_Mutex::Sentry aSentry(theMutex);
|
||||
Standard_Mutex::Sentry aSentry(theMutex);
|
||||
static Standard_Boolean inic = Standard_False;
|
||||
if (inic) return Standard_True;
|
||||
if (inic)
|
||||
return Standard_True;
|
||||
inic = Standard_True;
|
||||
}
|
||||
// self-registering
|
||||
@@ -59,18 +54,18 @@ Standard_Boolean STEPCAFControl_Controller::Init ()
|
||||
|
||||
// Indicates whether to write sub-shape names to 'Name' attributes of
|
||||
// STEP Representation Items
|
||||
Interface_Static::Init ("stepcaf", "write.stepcaf.subshapes.name", 'e', "");
|
||||
Interface_Static::Init ("stepcaf", "write.stepcaf.subshapes.name", '&', "enum 0");
|
||||
Interface_Static::Init ("stepcaf", "write.stepcaf.subshapes.name", '&', "eval Off"); // 0
|
||||
Interface_Static::Init ("stepcaf", "write.stepcaf.subshapes.name", '&', "eval On"); // 1
|
||||
Interface_Static::Init("stepcaf", "write.stepcaf.subshapes.name", 'e', "");
|
||||
Interface_Static::Init("stepcaf", "write.stepcaf.subshapes.name", '&', "enum 0");
|
||||
Interface_Static::Init("stepcaf", "write.stepcaf.subshapes.name", '&', "eval Off"); // 0
|
||||
Interface_Static::Init("stepcaf", "write.stepcaf.subshapes.name", '&', "eval On"); // 1
|
||||
Interface_Static::SetIVal("write.stepcaf.subshapes.name", 0); // Disabled by default
|
||||
|
||||
// Indicates whether to read sub-shape names from 'Name' attributes of
|
||||
// STEP Representation Items
|
||||
Interface_Static::Init ("stepcaf", "read.stepcaf.subshapes.name", 'e', "");
|
||||
Interface_Static::Init ("stepcaf", "read.stepcaf.subshapes.name", '&', "enum 0");
|
||||
Interface_Static::Init ("stepcaf", "read.stepcaf.subshapes.name", '&', "eval Off"); // 0
|
||||
Interface_Static::Init ("stepcaf", "read.stepcaf.subshapes.name", '&', "eval On"); // 1
|
||||
Interface_Static::Init("stepcaf", "read.stepcaf.subshapes.name", 'e', "");
|
||||
Interface_Static::Init("stepcaf", "read.stepcaf.subshapes.name", '&', "enum 0");
|
||||
Interface_Static::Init("stepcaf", "read.stepcaf.subshapes.name", '&', "eval Off"); // 0
|
||||
Interface_Static::Init("stepcaf", "read.stepcaf.subshapes.name", '&', "eval On"); // 1
|
||||
Interface_Static::SetIVal("read.stepcaf.subshapes.name", 0); // Disabled by default
|
||||
|
||||
return Standard_True;
|
||||
|
@@ -21,7 +21,6 @@
|
||||
|
||||
#include <STEPControl_Controller.hxx>
|
||||
|
||||
|
||||
class STEPCAFControl_Controller;
|
||||
DEFINE_STANDARD_HANDLE(STEPCAFControl_Controller, STEPControl_Controller)
|
||||
|
||||
@@ -33,37 +32,18 @@ class STEPCAFControl_Controller : public STEPControl_Controller
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Initializes the use of STEP Norm (the first time)
|
||||
Standard_EXPORT STEPCAFControl_Controller();
|
||||
|
||||
|
||||
//! Standard Initialisation. It creates a Controller for STEP-XCAF
|
||||
//! and records it to various names, available to select it later
|
||||
//! Returns True when done, False if could not be done
|
||||
Standard_EXPORT static Standard_Boolean Init();
|
||||
|
||||
|
||||
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(STEPCAFControl_Controller,STEPControl_Controller)
|
||||
DEFINE_STANDARD_RTTIEXT(STEPCAFControl_Controller, STEPControl_Controller)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _STEPCAFControl_Controller_HeaderFile
|
||||
|
@@ -11,7 +11,6 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#ifndef STEPCAFControl_DataMapIteratorOfDataMapOfLabelExternFile_HeaderFile
|
||||
#define STEPCAFControl_DataMapIteratorOfDataMapOfLabelExternFile_HeaderFile
|
||||
|
||||
|
@@ -11,7 +11,6 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#ifndef STEPCAFControl_DataMapIteratorOfDataMapOfLabelShape_HeaderFile
|
||||
#define STEPCAFControl_DataMapIteratorOfDataMapOfLabelShape_HeaderFile
|
||||
|
||||
|
@@ -11,7 +11,6 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#ifndef STEPCAFControl_DataMapIteratorOfDataMapOfPDExternFile_HeaderFile
|
||||
#define STEPCAFControl_DataMapIteratorOfDataMapOfPDExternFile_HeaderFile
|
||||
|
||||
|
@@ -11,7 +11,6 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#ifndef STEPCAFControl_DataMapIteratorOfDataMapOfSDRExternFile_HeaderFile
|
||||
#define STEPCAFControl_DataMapIteratorOfDataMapOfSDRExternFile_HeaderFile
|
||||
|
||||
|
@@ -11,7 +11,6 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#ifndef STEPCAFControl_DataMapIteratorOfDataMapOfShapePD_HeaderFile
|
||||
#define STEPCAFControl_DataMapIteratorOfDataMapOfShapePD_HeaderFile
|
||||
|
||||
|
@@ -11,7 +11,6 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#ifndef STEPCAFControl_DataMapIteratorOfDataMapOfShapeSDR_HeaderFile
|
||||
#define STEPCAFControl_DataMapIteratorOfDataMapOfShapeSDR_HeaderFile
|
||||
|
||||
|
@@ -20,8 +20,9 @@
|
||||
#include <STEPCAFControl_ExternFile.hxx>
|
||||
#include <NCollection_DataMap.hxx>
|
||||
|
||||
typedef NCollection_DataMap<TDF_Label,Handle(STEPCAFControl_ExternFile)> STEPCAFControl_DataMapOfLabelExternFile;
|
||||
typedef NCollection_DataMap<TDF_Label,Handle(STEPCAFControl_ExternFile)>::Iterator STEPCAFControl_DataMapIteratorOfDataMapOfLabelExternFile;
|
||||
|
||||
typedef NCollection_DataMap<TDF_Label, Handle(STEPCAFControl_ExternFile)>
|
||||
STEPCAFControl_DataMapOfLabelExternFile;
|
||||
typedef NCollection_DataMap<TDF_Label, Handle(STEPCAFControl_ExternFile)>::Iterator
|
||||
STEPCAFControl_DataMapIteratorOfDataMapOfLabelExternFile;
|
||||
|
||||
#endif
|
||||
|
@@ -20,8 +20,8 @@
|
||||
#include <TDF_Label.hxx>
|
||||
#include <NCollection_DataMap.hxx>
|
||||
|
||||
typedef NCollection_DataMap<TDF_Label,TopoDS_Shape> STEPCAFControl_DataMapOfLabelShape;
|
||||
typedef NCollection_DataMap<TDF_Label,TopoDS_Shape>::Iterator STEPCAFControl_DataMapIteratorOfDataMapOfLabelShape;
|
||||
|
||||
typedef NCollection_DataMap<TDF_Label, TopoDS_Shape> STEPCAFControl_DataMapOfLabelShape;
|
||||
typedef NCollection_DataMap<TDF_Label, TopoDS_Shape>::Iterator
|
||||
STEPCAFControl_DataMapIteratorOfDataMapOfLabelShape;
|
||||
|
||||
#endif
|
||||
|
@@ -20,8 +20,10 @@
|
||||
#include <STEPCAFControl_ExternFile.hxx>
|
||||
#include <NCollection_DataMap.hxx>
|
||||
|
||||
typedef NCollection_DataMap<Handle(StepBasic_ProductDefinition),Handle(STEPCAFControl_ExternFile)> STEPCAFControl_DataMapOfPDExternFile;
|
||||
typedef NCollection_DataMap<Handle(StepBasic_ProductDefinition),Handle(STEPCAFControl_ExternFile)>::Iterator STEPCAFControl_DataMapIteratorOfDataMapOfPDExternFile;
|
||||
|
||||
typedef NCollection_DataMap<Handle(StepBasic_ProductDefinition), Handle(STEPCAFControl_ExternFile)>
|
||||
STEPCAFControl_DataMapOfPDExternFile;
|
||||
typedef NCollection_DataMap<Handle(StepBasic_ProductDefinition),
|
||||
Handle(STEPCAFControl_ExternFile)>::Iterator
|
||||
STEPCAFControl_DataMapIteratorOfDataMapOfPDExternFile;
|
||||
|
||||
#endif
|
||||
|
@@ -20,8 +20,11 @@
|
||||
#include <STEPCAFControl_ExternFile.hxx>
|
||||
#include <NCollection_DataMap.hxx>
|
||||
|
||||
typedef NCollection_DataMap<Handle(StepShape_ShapeDefinitionRepresentation),Handle(STEPCAFControl_ExternFile)> STEPCAFControl_DataMapOfSDRExternFile;
|
||||
typedef NCollection_DataMap<Handle(StepShape_ShapeDefinitionRepresentation),Handle(STEPCAFControl_ExternFile)>::Iterator STEPCAFControl_DataMapIteratorOfDataMapOfSDRExternFile;
|
||||
|
||||
typedef NCollection_DataMap<Handle(StepShape_ShapeDefinitionRepresentation),
|
||||
Handle(STEPCAFControl_ExternFile)>
|
||||
STEPCAFControl_DataMapOfSDRExternFile;
|
||||
typedef NCollection_DataMap<Handle(StepShape_ShapeDefinitionRepresentation),
|
||||
Handle(STEPCAFControl_ExternFile)>::Iterator
|
||||
STEPCAFControl_DataMapIteratorOfDataMapOfSDRExternFile;
|
||||
|
||||
#endif
|
||||
|
@@ -21,8 +21,13 @@
|
||||
#include <TopTools_ShapeMapHasher.hxx>
|
||||
#include <NCollection_DataMap.hxx>
|
||||
|
||||
typedef NCollection_DataMap<TopoDS_Shape,Handle(StepBasic_ProductDefinition),TopTools_ShapeMapHasher> STEPCAFControl_DataMapOfShapePD;
|
||||
typedef NCollection_DataMap<TopoDS_Shape,Handle(StepBasic_ProductDefinition),TopTools_ShapeMapHasher>::Iterator STEPCAFControl_DataMapIteratorOfDataMapOfShapePD;
|
||||
|
||||
typedef NCollection_DataMap<TopoDS_Shape,
|
||||
Handle(StepBasic_ProductDefinition),
|
||||
TopTools_ShapeMapHasher>
|
||||
STEPCAFControl_DataMapOfShapePD;
|
||||
typedef NCollection_DataMap<TopoDS_Shape,
|
||||
Handle(StepBasic_ProductDefinition),
|
||||
TopTools_ShapeMapHasher>::Iterator
|
||||
STEPCAFControl_DataMapIteratorOfDataMapOfShapePD;
|
||||
|
||||
#endif
|
||||
|
@@ -20,8 +20,13 @@
|
||||
#include <TopTools_ShapeMapHasher.hxx>
|
||||
#include <NCollection_DataMap.hxx>
|
||||
|
||||
typedef NCollection_DataMap<TopoDS_Shape,Handle(StepShape_ShapeDefinitionRepresentation),TopTools_ShapeMapHasher> STEPCAFControl_DataMapOfShapeSDR;
|
||||
typedef NCollection_DataMap<TopoDS_Shape,Handle(StepShape_ShapeDefinitionRepresentation),TopTools_ShapeMapHasher>::Iterator STEPCAFControl_DataMapIteratorOfDataMapOfShapeSDR;
|
||||
|
||||
typedef NCollection_DataMap<TopoDS_Shape,
|
||||
Handle(StepShape_ShapeDefinitionRepresentation),
|
||||
TopTools_ShapeMapHasher>
|
||||
STEPCAFControl_DataMapOfShapeSDR;
|
||||
typedef NCollection_DataMap<TopoDS_Shape,
|
||||
Handle(StepShape_ShapeDefinitionRepresentation),
|
||||
TopTools_ShapeMapHasher>::Iterator
|
||||
STEPCAFControl_DataMapIteratorOfDataMapOfShapeSDR;
|
||||
|
||||
#endif
|
||||
|
@@ -13,19 +13,17 @@
|
||||
// Alternatively, this file may be used under the terms of Open CASCADE
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
|
||||
#include <STEPCAFControl_ExternFile.hxx>
|
||||
#include <TDF_Label.hxx>
|
||||
#include <XSControl_WorkSession.hxx>
|
||||
|
||||
IMPLEMENT_STANDARD_RTTIEXT(STEPCAFControl_ExternFile,Standard_Transient)
|
||||
IMPLEMENT_STANDARD_RTTIEXT(STEPCAFControl_ExternFile, Standard_Transient)
|
||||
|
||||
//=======================================================================
|
||||
//function : STEPCAFControl_ExternFile
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
STEPCAFControl_ExternFile::STEPCAFControl_ExternFile ()
|
||||
: myLoadStatus(IFSelect_RetVoid), myTransferStatus(Standard_False),
|
||||
myWriteStatus(IFSelect_RetVoid)
|
||||
//=================================================================================================
|
||||
|
||||
STEPCAFControl_ExternFile::STEPCAFControl_ExternFile()
|
||||
: myLoadStatus(IFSelect_RetVoid),
|
||||
myTransferStatus(Standard_False),
|
||||
myWriteStatus(IFSelect_RetVoid)
|
||||
{
|
||||
}
|
||||
|
@@ -25,7 +25,6 @@
|
||||
class XSControl_WorkSession;
|
||||
class TCollection_HAsciiString;
|
||||
|
||||
|
||||
class STEPCAFControl_ExternFile;
|
||||
DEFINE_STANDARD_HANDLE(STEPCAFControl_ExternFile, Standard_Transient)
|
||||
|
||||
@@ -35,63 +34,45 @@ class STEPCAFControl_ExternFile : public Standard_Transient
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
|
||||
//! Creates an empty structure
|
||||
Standard_EXPORT STEPCAFControl_ExternFile();
|
||||
|
||||
void SetWS (const Handle(XSControl_WorkSession)& WS);
|
||||
|
||||
Handle(XSControl_WorkSession) GetWS() const;
|
||||
|
||||
void SetLoadStatus (const IFSelect_ReturnStatus stat);
|
||||
|
||||
IFSelect_ReturnStatus GetLoadStatus() const;
|
||||
|
||||
void SetTransferStatus (const Standard_Boolean isok);
|
||||
|
||||
Standard_Boolean GetTransferStatus() const;
|
||||
|
||||
void SetWriteStatus (const IFSelect_ReturnStatus stat);
|
||||
|
||||
IFSelect_ReturnStatus GetWriteStatus() const;
|
||||
|
||||
void SetName (const Handle(TCollection_HAsciiString)& name);
|
||||
|
||||
Handle(TCollection_HAsciiString) GetName() const;
|
||||
|
||||
void SetLabel (const TDF_Label& L);
|
||||
|
||||
TDF_Label GetLabel() const;
|
||||
|
||||
void SetWS(const Handle(XSControl_WorkSession)& WS);
|
||||
|
||||
Handle(XSControl_WorkSession) GetWS() const;
|
||||
|
||||
void SetLoadStatus(const IFSelect_ReturnStatus stat);
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(STEPCAFControl_ExternFile,Standard_Transient)
|
||||
IFSelect_ReturnStatus GetLoadStatus() const;
|
||||
|
||||
void SetTransferStatus(const Standard_Boolean isok);
|
||||
|
||||
Standard_Boolean GetTransferStatus() const;
|
||||
|
||||
void SetWriteStatus(const IFSelect_ReturnStatus stat);
|
||||
|
||||
IFSelect_ReturnStatus GetWriteStatus() const;
|
||||
|
||||
void SetName(const Handle(TCollection_HAsciiString)& name);
|
||||
|
||||
Handle(TCollection_HAsciiString) GetName() const;
|
||||
|
||||
void SetLabel(const TDF_Label& L);
|
||||
|
||||
TDF_Label GetLabel() const;
|
||||
|
||||
DEFINE_STANDARD_RTTIEXT(STEPCAFControl_ExternFile, Standard_Transient)
|
||||
|
||||
protected:
|
||||
|
||||
|
||||
|
||||
|
||||
private:
|
||||
|
||||
|
||||
Handle(XSControl_WorkSession) myWS;
|
||||
IFSelect_ReturnStatus myLoadStatus;
|
||||
Standard_Boolean myTransferStatus;
|
||||
IFSelect_ReturnStatus myWriteStatus;
|
||||
Handle(XSControl_WorkSession) myWS;
|
||||
IFSelect_ReturnStatus myLoadStatus;
|
||||
Standard_Boolean myTransferStatus;
|
||||
IFSelect_ReturnStatus myWriteStatus;
|
||||
Handle(TCollection_HAsciiString) myName;
|
||||
TDF_Label myLabel;
|
||||
|
||||
|
||||
TDF_Label myLabel;
|
||||
};
|
||||
|
||||
|
||||
#include <STEPCAFControl_ExternFile.lxx>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endif // _STEPCAFControl_ExternFile_HeaderFile
|
||||
|
@@ -14,101 +14,101 @@
|
||||
// commercial license or contractual agreement.
|
||||
|
||||
//=======================================================================
|
||||
//function : SetWS
|
||||
//purpose :
|
||||
// function : SetWS
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline void STEPCAFControl_ExternFile::SetWS (const Handle(XSControl_WorkSession) &WS)
|
||||
inline void STEPCAFControl_ExternFile::SetWS(const Handle(XSControl_WorkSession)& WS)
|
||||
{
|
||||
myWS = WS;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GetWS
|
||||
//purpose :
|
||||
// function : GetWS
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline Handle(XSControl_WorkSession) STEPCAFControl_ExternFile::GetWS () const
|
||||
inline Handle(XSControl_WorkSession) STEPCAFControl_ExternFile::GetWS() const
|
||||
{
|
||||
return myWS;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetLoadStatus
|
||||
//purpose :
|
||||
// function : SetLoadStatus
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline void STEPCAFControl_ExternFile::SetLoadStatus (const IFSelect_ReturnStatus stat)
|
||||
inline void STEPCAFControl_ExternFile::SetLoadStatus(const IFSelect_ReturnStatus stat)
|
||||
{
|
||||
myLoadStatus = stat;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GetLoadStatus
|
||||
//purpose :
|
||||
// function : GetLoadStatus
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline IFSelect_ReturnStatus STEPCAFControl_ExternFile::GetLoadStatus () const
|
||||
inline IFSelect_ReturnStatus STEPCAFControl_ExternFile::GetLoadStatus() const
|
||||
{
|
||||
return myLoadStatus;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetTransferStatus
|
||||
//purpose :
|
||||
// function : SetTransferStatus
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline void STEPCAFControl_ExternFile::SetTransferStatus (const Standard_Boolean isok)
|
||||
inline void STEPCAFControl_ExternFile::SetTransferStatus(const Standard_Boolean isok)
|
||||
{
|
||||
myTransferStatus = isok;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GetTransferStatus
|
||||
//purpose :
|
||||
// function : GetTransferStatus
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline Standard_Boolean STEPCAFControl_ExternFile::GetTransferStatus () const
|
||||
inline Standard_Boolean STEPCAFControl_ExternFile::GetTransferStatus() const
|
||||
{
|
||||
return myTransferStatus;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetWriteStatus
|
||||
//purpose :
|
||||
// function : SetWriteStatus
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline void STEPCAFControl_ExternFile::SetWriteStatus (const IFSelect_ReturnStatus stat)
|
||||
inline void STEPCAFControl_ExternFile::SetWriteStatus(const IFSelect_ReturnStatus stat)
|
||||
{
|
||||
myWriteStatus = stat;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GetWriteStatus
|
||||
//purpose :
|
||||
// function : GetWriteStatus
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline IFSelect_ReturnStatus STEPCAFControl_ExternFile::GetWriteStatus () const
|
||||
inline IFSelect_ReturnStatus STEPCAFControl_ExternFile::GetWriteStatus() const
|
||||
{
|
||||
return myWriteStatus;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : SetName
|
||||
//purpose :
|
||||
// function : SetName
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline void STEPCAFControl_ExternFile::SetName (const Handle(TCollection_HAsciiString) &name)
|
||||
inline void STEPCAFControl_ExternFile::SetName(const Handle(TCollection_HAsciiString)& name)
|
||||
{
|
||||
myName = name;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GetName
|
||||
//purpose :
|
||||
// function : GetName
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline Handle(TCollection_HAsciiString) STEPCAFControl_ExternFile::GetName () const
|
||||
inline Handle(TCollection_HAsciiString) STEPCAFControl_ExternFile::GetName() const
|
||||
{
|
||||
return myName;
|
||||
}
|
||||
@@ -116,7 +116,7 @@ inline Handle(TCollection_HAsciiString) STEPCAFControl_ExternFile::GetName () co
|
||||
/*
|
||||
//=======================================================================
|
||||
//function : SetShape
|
||||
//purpose :
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline void STEPCAFControl_ExternFile::SetShape (const TopoDS_Shape &Shape)
|
||||
@@ -126,7 +126,7 @@ inline void STEPCAFControl_ExternFile::SetShape (const TopoDS_Shape &Shape)
|
||||
|
||||
//=======================================================================
|
||||
//function : GetShape
|
||||
//purpose :
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline TopoDS_Shape STEPCAFControl_ExternFile::GetShape () const
|
||||
@@ -136,21 +136,21 @@ inline TopoDS_Shape STEPCAFControl_ExternFile::GetShape () const
|
||||
*/
|
||||
|
||||
//=======================================================================
|
||||
//function : SetLabel
|
||||
//purpose :
|
||||
// function : SetLabel
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline void STEPCAFControl_ExternFile::SetLabel (const TDF_Label &Label)
|
||||
inline void STEPCAFControl_ExternFile::SetLabel(const TDF_Label& Label)
|
||||
{
|
||||
myLabel = Label;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
//function : GetLabel
|
||||
//purpose :
|
||||
// function : GetLabel
|
||||
// purpose :
|
||||
//=======================================================================
|
||||
|
||||
inline TDF_Label STEPCAFControl_ExternFile::GetLabel () const
|
||||
inline TDF_Label STEPCAFControl_ExternFile::GetLabel() const
|
||||
{
|
||||
return myLabel;
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -46,63 +46,80 @@
|
||||
class STEPCAFControl_GDTProperty
|
||||
{
|
||||
public:
|
||||
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
Standard_EXPORT STEPCAFControl_GDTProperty();
|
||||
Standard_EXPORT static void GetDimModifiers(const Handle(StepRepr_CompoundRepresentationItem)& theCRI,
|
||||
XCAFDimTolObjects_DimensionModifiersSequence& theModifiers);
|
||||
Standard_EXPORT STEPCAFControl_GDTProperty();
|
||||
Standard_EXPORT static void GetDimModifiers(
|
||||
const Handle(StepRepr_CompoundRepresentationItem)& theCRI,
|
||||
XCAFDimTolObjects_DimensionModifiersSequence& theModifiers);
|
||||
|
||||
Standard_EXPORT static void GetDimClassOfTolerance(const Handle(StepShape_LimitsAndFits)& theLAF,
|
||||
Standard_Boolean& theHolle,
|
||||
XCAFDimTolObjects_DimensionFormVariance& theFV,
|
||||
XCAFDimTolObjects_DimensionGrade& theG);
|
||||
XCAFDimTolObjects_DimensionGrade& theG);
|
||||
|
||||
Standard_EXPORT static Standard_Boolean GetDimType(const Handle(TCollection_HAsciiString)& theName,
|
||||
XCAFDimTolObjects_DimensionType& theType);
|
||||
Standard_EXPORT static Standard_Boolean GetDimType(
|
||||
const Handle(TCollection_HAsciiString)& theName,
|
||||
XCAFDimTolObjects_DimensionType& theType);
|
||||
|
||||
Standard_EXPORT static Standard_Boolean GetDatumTargetType(const Handle(TCollection_HAsciiString)& theDescription,
|
||||
XCAFDimTolObjects_DatumTargetType& theType);
|
||||
Standard_EXPORT static Standard_Boolean GetDatumTargetType(
|
||||
const Handle(TCollection_HAsciiString)& theDescription,
|
||||
XCAFDimTolObjects_DatumTargetType& theType);
|
||||
|
||||
Standard_EXPORT static Standard_Boolean GetDimQualifierType(const Handle(TCollection_HAsciiString)& theDescription,
|
||||
XCAFDimTolObjects_DimensionQualifier& theType);
|
||||
Standard_EXPORT static Standard_Boolean GetDimQualifierType(
|
||||
const Handle(TCollection_HAsciiString)& theDescription,
|
||||
XCAFDimTolObjects_DimensionQualifier& theType);
|
||||
|
||||
Standard_EXPORT static Standard_Boolean GetTolValueType(const Handle(TCollection_HAsciiString)& theDescription,
|
||||
XCAFDimTolObjects_GeomToleranceTypeValue& theType);
|
||||
Standard_EXPORT static Standard_Boolean GetTolValueType(
|
||||
const Handle(TCollection_HAsciiString)& theDescription,
|
||||
XCAFDimTolObjects_GeomToleranceTypeValue& theType);
|
||||
|
||||
Standard_EXPORT static Handle(TCollection_HAsciiString) GetTolValueType(const XCAFDimTolObjects_GeomToleranceTypeValue& theType);
|
||||
Standard_EXPORT static Handle(TCollection_HAsciiString) GetTolValueType(
|
||||
const XCAFDimTolObjects_GeomToleranceTypeValue& theType);
|
||||
|
||||
Standard_EXPORT static Handle(TCollection_HAsciiString) GetDimTypeName(const XCAFDimTolObjects_DimensionType theType);
|
||||
Standard_EXPORT static Handle(TCollection_HAsciiString) GetDimTypeName(
|
||||
const XCAFDimTolObjects_DimensionType theType);
|
||||
|
||||
Standard_EXPORT static Handle(TCollection_HAsciiString) GetDimQualifierName(const XCAFDimTolObjects_DimensionQualifier theQualifier);
|
||||
Standard_EXPORT static Handle(TCollection_HAsciiString) GetDimQualifierName(
|
||||
const XCAFDimTolObjects_DimensionQualifier theQualifier);
|
||||
|
||||
Standard_EXPORT static Handle(TCollection_HAsciiString) GetDimModifierName(const XCAFDimTolObjects_DimensionModif theModifier);
|
||||
Standard_EXPORT static Handle(TCollection_HAsciiString) GetDimModifierName(
|
||||
const XCAFDimTolObjects_DimensionModif theModifier);
|
||||
|
||||
Standard_EXPORT static Handle(StepShape_LimitsAndFits) GetLimitsAndFits(Standard_Boolean theHole,
|
||||
XCAFDimTolObjects_DimensionFormVariance theFormVariance,
|
||||
XCAFDimTolObjects_DimensionGrade theGrade);
|
||||
Standard_EXPORT static Handle(StepShape_LimitsAndFits) GetLimitsAndFits(
|
||||
Standard_Boolean theHole,
|
||||
XCAFDimTolObjects_DimensionFormVariance theFormVariance,
|
||||
XCAFDimTolObjects_DimensionGrade theGrade);
|
||||
|
||||
Standard_EXPORT static Handle(TCollection_HAsciiString) GetDatumTargetName(const XCAFDimTolObjects_DatumTargetType theDatumType);
|
||||
Standard_EXPORT static Handle(TCollection_HAsciiString) GetDatumTargetName(
|
||||
const XCAFDimTolObjects_DatumTargetType theDatumType);
|
||||
|
||||
Standard_EXPORT static Standard_Boolean IsDimensionalLocation(const XCAFDimTolObjects_DimensionType theType);
|
||||
Standard_EXPORT static Standard_Boolean IsDimensionalLocation(
|
||||
const XCAFDimTolObjects_DimensionType theType);
|
||||
|
||||
Standard_EXPORT static Standard_Boolean IsDimensionalSize(const XCAFDimTolObjects_DimensionType theType);
|
||||
Standard_EXPORT static Standard_Boolean IsDimensionalSize(
|
||||
const XCAFDimTolObjects_DimensionType theType);
|
||||
|
||||
Standard_EXPORT static StepDimTol_GeometricToleranceType GetGeomToleranceType(const XCAFDimTolObjects_GeomToleranceType theType);
|
||||
Standard_EXPORT static StepDimTol_GeometricToleranceType GetGeomToleranceType(
|
||||
const XCAFDimTolObjects_GeomToleranceType theType);
|
||||
|
||||
Standard_EXPORT static XCAFDimTolObjects_GeomToleranceType GetGeomToleranceType(const StepDimTol_GeometricToleranceType theType);
|
||||
Standard_EXPORT static XCAFDimTolObjects_GeomToleranceType GetGeomToleranceType(
|
||||
const StepDimTol_GeometricToleranceType theType);
|
||||
|
||||
Standard_EXPORT static Handle(StepDimTol_GeometricTolerance) GetGeomTolerance(const XCAFDimTolObjects_GeomToleranceType theType);
|
||||
Standard_EXPORT static Handle(StepDimTol_GeometricTolerance) GetGeomTolerance(
|
||||
const XCAFDimTolObjects_GeomToleranceType theType);
|
||||
|
||||
Standard_EXPORT static StepDimTol_GeometricToleranceModifier GetGeomToleranceModifier(const XCAFDimTolObjects_GeomToleranceModif theModifier);
|
||||
Standard_EXPORT static StepDimTol_GeometricToleranceModifier GetGeomToleranceModifier(
|
||||
const XCAFDimTolObjects_GeomToleranceModif theModifier);
|
||||
|
||||
Standard_EXPORT static Handle(StepDimTol_HArray1OfDatumReferenceModifier) GetDatumRefModifiers(const XCAFDimTolObjects_DatumModifiersSequence& theModifiers,
|
||||
const XCAFDimTolObjects_DatumModifWithValue& theModifWithVal,
|
||||
const Standard_Real theValue,
|
||||
const StepBasic_Unit& theUnit);
|
||||
|
||||
Standard_EXPORT static Handle(StepVisual_TessellatedGeometricSet) GetTessellation(const TopoDS_Shape& theShape);
|
||||
Standard_EXPORT static Handle(StepDimTol_HArray1OfDatumReferenceModifier) GetDatumRefModifiers(
|
||||
const XCAFDimTolObjects_DatumModifiersSequence& theModifiers,
|
||||
const XCAFDimTolObjects_DatumModifWithValue& theModifWithVal,
|
||||
const Standard_Real theValue,
|
||||
const StepBasic_Unit& theUnit);
|
||||
|
||||
Standard_EXPORT static Handle(StepVisual_TessellatedGeometricSet) GetTessellation(
|
||||
const TopoDS_Shape& theShape);
|
||||
};
|
||||
|
||||
#endif // _STEPCAFControl_GDTProperty_HeaderFile
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -56,12 +56,12 @@ class Transfer_Binder;
|
||||
//! file (e.g. if it is single file)
|
||||
//! Results of reading other files can be accessed by name of the
|
||||
//! file or by iterating on a readers
|
||||
class STEPCAFControl_Reader
|
||||
class STEPCAFControl_Reader
|
||||
{
|
||||
public:
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
using ParameterMap = XSControl_Reader::ParameterMap;
|
||||
using ParameterMap = XSControl_Reader::ParameterMap;
|
||||
using ProcessingFlags = XSControl_Reader::ProcessingFlags;
|
||||
|
||||
public:
|
||||
@@ -69,140 +69,151 @@ public:
|
||||
//! STEP model and sets ColorMode, LayerMode, NameMode and
|
||||
//! PropsMode to Standard_True.
|
||||
Standard_EXPORT STEPCAFControl_Reader();
|
||||
|
||||
|
||||
//! Creates a reader tool and attaches it to an already existing Session
|
||||
//! Clears the session if it was not yet set for STEP
|
||||
Standard_EXPORT STEPCAFControl_Reader(const Handle(XSControl_WorkSession)& WS, const Standard_Boolean scratch = Standard_True);
|
||||
Standard_EXPORT STEPCAFControl_Reader(const Handle(XSControl_WorkSession)& WS,
|
||||
const Standard_Boolean scratch = Standard_True);
|
||||
|
||||
//! Destructor.
|
||||
Standard_EXPORT virtual ~STEPCAFControl_Reader();
|
||||
|
||||
//! Clears the internal data structures and attaches to a new session
|
||||
//! Clears the session if it was not yet set for STEP
|
||||
Standard_EXPORT void Init (const Handle(XSControl_WorkSession)& WS, const Standard_Boolean scratch = Standard_True);
|
||||
Standard_EXPORT void Init(const Handle(XSControl_WorkSession)& WS,
|
||||
const Standard_Boolean scratch = Standard_True);
|
||||
|
||||
//! Loads a file and returns the read status
|
||||
//! Provided for use like single-file reader.
|
||||
//! @param[in] theFileName file to open
|
||||
//! @return read status
|
||||
Standard_EXPORT IFSelect_ReturnStatus ReadFile (const Standard_CString theFileName);
|
||||
Standard_EXPORT IFSelect_ReturnStatus ReadFile(const Standard_CString theFileName);
|
||||
|
||||
//! Loads a file and returns the read status
|
||||
//! Provided for use like single-file reader.
|
||||
//! @param[in] theFileName file to open
|
||||
//! @param[in] theParams default configuration parameters
|
||||
//! @return read status
|
||||
Standard_EXPORT IFSelect_ReturnStatus ReadFile(const Standard_CString theFileName,
|
||||
Standard_EXPORT IFSelect_ReturnStatus ReadFile(const Standard_CString theFileName,
|
||||
const DESTEP_Parameters& theParams);
|
||||
|
||||
//! Loads a file from stream and returns the read status.
|
||||
//! @param[in] theName auxiliary stream name
|
||||
//! @param[in] theIStream stream to read from
|
||||
//! @return read status
|
||||
Standard_EXPORT IFSelect_ReturnStatus ReadStream (const Standard_CString theName,
|
||||
std::istream& theIStream);
|
||||
Standard_EXPORT IFSelect_ReturnStatus ReadStream(const Standard_CString theName,
|
||||
std::istream& theIStream);
|
||||
|
||||
//! Returns number of roots recognized for transfer
|
||||
//! Shortcut for Reader().NbRootsForTransfer()
|
||||
Standard_EXPORT Standard_Integer NbRootsForTransfer();
|
||||
|
||||
|
||||
//! Translates currently loaded STEP file into the document
|
||||
//! Returns True if succeeded, and False in case of fail
|
||||
//! Provided for use like single-file reader
|
||||
Standard_EXPORT Standard_Boolean TransferOneRoot (const Standard_Integer num,
|
||||
const Handle(TDocStd_Document)& doc,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
Standard_EXPORT Standard_Boolean
|
||||
TransferOneRoot(const Standard_Integer num,
|
||||
const Handle(TDocStd_Document)& doc,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
//! Translates currently loaded STEP file into the document
|
||||
//! Returns True if succeeded, and False in case of fail
|
||||
//! Provided for use like single-file reader
|
||||
Standard_EXPORT Standard_Boolean Transfer (const Handle(TDocStd_Document)& doc,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
Standard_EXPORT Standard_Boolean Perform (const TCollection_AsciiString& filename,
|
||||
const Handle(TDocStd_Document)& doc,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
Standard_EXPORT Standard_Boolean
|
||||
Transfer(const Handle(TDocStd_Document)& doc,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
Standard_EXPORT Standard_Boolean Perform (const TCollection_AsciiString& filename,
|
||||
const Handle(TDocStd_Document)& doc,
|
||||
const DESTEP_Parameters& theParams,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
//! Translate STEP file given by filename into the document
|
||||
//! Return True if succeeded, and False in case of fail
|
||||
Standard_EXPORT Standard_Boolean Perform (const Standard_CString filename,
|
||||
const Handle(TDocStd_Document)& doc,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
Standard_EXPORT Standard_Boolean
|
||||
Perform(const TCollection_AsciiString& filename,
|
||||
const Handle(TDocStd_Document)& doc,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
Standard_EXPORT Standard_Boolean
|
||||
Perform(const TCollection_AsciiString& filename,
|
||||
const Handle(TDocStd_Document)& doc,
|
||||
const DESTEP_Parameters& theParams,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
//! Translate STEP file given by filename into the document
|
||||
//! Return True if succeeded, and False in case of fail
|
||||
Standard_EXPORT Standard_Boolean Perform (const Standard_CString filename,
|
||||
const Handle(TDocStd_Document)& doc,
|
||||
const DESTEP_Parameters& theParams,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
Standard_EXPORT Standard_Boolean
|
||||
Perform(const Standard_CString filename,
|
||||
const Handle(TDocStd_Document)& doc,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
//! Translate STEP file given by filename into the document
|
||||
//! Return True if succeeded, and False in case of fail
|
||||
Standard_EXPORT Standard_Boolean
|
||||
Perform(const Standard_CString filename,
|
||||
const Handle(TDocStd_Document)& doc,
|
||||
const DESTEP_Parameters& theParams,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
//! Returns data on external files
|
||||
//! Returns Null handle if no external files are read
|
||||
Standard_EXPORT const NCollection_DataMap<TCollection_AsciiString, Handle(STEPCAFControl_ExternFile)> & ExternFiles() const;
|
||||
|
||||
Standard_EXPORT const NCollection_DataMap<TCollection_AsciiString,
|
||||
Handle(STEPCAFControl_ExternFile)>&
|
||||
ExternFiles() const;
|
||||
|
||||
//! Returns data on external file by its name
|
||||
//! Returns False if no external file with given name is read
|
||||
Standard_EXPORT Standard_Boolean ExternFile (const Standard_CString name, Handle(STEPCAFControl_ExternFile)& ef) const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean ExternFile(const Standard_CString name,
|
||||
Handle(STEPCAFControl_ExternFile)& ef) const;
|
||||
|
||||
//! Returns basic reader
|
||||
Standard_EXPORT STEPControl_Reader& ChangeReader();
|
||||
|
||||
|
||||
//! Returns basic reader as const
|
||||
Standard_EXPORT const STEPControl_Reader& Reader() const;
|
||||
|
||||
|
||||
//! Returns label of instance of an assembly component
|
||||
//! corresponding to a given NAUO
|
||||
Standard_EXPORT static TDF_Label FindInstance
|
||||
(const Handle(StepRepr_NextAssemblyUsageOccurrence)& NAUO,
|
||||
const Handle(XCAFDoc_ShapeTool)& STool,
|
||||
const STEPConstruct_Tool& Tool,
|
||||
const XCAFDoc_DataMapOfShapeLabel& ShapeLabelMap);
|
||||
|
||||
Standard_EXPORT static TDF_Label FindInstance(
|
||||
const Handle(StepRepr_NextAssemblyUsageOccurrence)& NAUO,
|
||||
const Handle(XCAFDoc_ShapeTool)& STool,
|
||||
const STEPConstruct_Tool& Tool,
|
||||
const XCAFDoc_DataMapOfShapeLabel& ShapeLabelMap);
|
||||
|
||||
//! Set ColorMode for indicate read Colors or not.
|
||||
Standard_EXPORT void SetColorMode (const Standard_Boolean colormode);
|
||||
|
||||
Standard_EXPORT void SetColorMode(const Standard_Boolean colormode);
|
||||
|
||||
Standard_EXPORT Standard_Boolean GetColorMode() const;
|
||||
|
||||
|
||||
//! Set NameMode for indicate read Name or not.
|
||||
Standard_EXPORT void SetNameMode (const Standard_Boolean namemode);
|
||||
|
||||
Standard_EXPORT void SetNameMode(const Standard_Boolean namemode);
|
||||
|
||||
Standard_EXPORT Standard_Boolean GetNameMode() const;
|
||||
|
||||
//! Set LayerMode for indicate read Layers or not.
|
||||
Standard_EXPORT void SetLayerMode (const Standard_Boolean layermode);
|
||||
|
||||
Standard_EXPORT void SetLayerMode(const Standard_Boolean layermode);
|
||||
|
||||
Standard_EXPORT Standard_Boolean GetLayerMode() const;
|
||||
|
||||
|
||||
//! PropsMode for indicate read Validation properties or not.
|
||||
Standard_EXPORT void SetPropsMode (const Standard_Boolean propsmode);
|
||||
|
||||
Standard_EXPORT void SetPropsMode(const Standard_Boolean propsmode);
|
||||
|
||||
Standard_EXPORT Standard_Boolean GetPropsMode() const;
|
||||
|
||||
//! MetaMode for indicate read Metadata or not.
|
||||
Standard_EXPORT void SetMetaMode(const Standard_Boolean theMetaMode);
|
||||
|
||||
Standard_EXPORT Standard_Boolean GetMetaMode() const;
|
||||
|
||||
|
||||
//! Set SHUO mode for indicate write SHUO or not.
|
||||
Standard_EXPORT void SetSHUOMode (const Standard_Boolean shuomode);
|
||||
|
||||
Standard_EXPORT void SetSHUOMode(const Standard_Boolean shuomode);
|
||||
|
||||
Standard_EXPORT Standard_Boolean GetSHUOMode() const;
|
||||
|
||||
|
||||
//! Set GDT mode for indicate write GDT or not.
|
||||
Standard_EXPORT void SetGDTMode (const Standard_Boolean gdtmode);
|
||||
|
||||
Standard_EXPORT void SetGDTMode(const Standard_Boolean gdtmode);
|
||||
|
||||
Standard_EXPORT Standard_Boolean GetGDTMode() const;
|
||||
|
||||
|
||||
//! Set Material mode
|
||||
Standard_EXPORT void SetMatMode (const Standard_Boolean matmode);
|
||||
|
||||
Standard_EXPORT void SetMatMode(const Standard_Boolean matmode);
|
||||
|
||||
Standard_EXPORT Standard_Boolean GetMatMode() const;
|
||||
|
||||
|
||||
//! Set View mode
|
||||
Standard_EXPORT void SetViewMode(const Standard_Boolean viewmode);
|
||||
|
||||
@@ -227,7 +238,7 @@ public:
|
||||
//! @param theParameters the parameters for shape processing.
|
||||
//! @param theAdditionalParameters the additional parameters for shape processing.
|
||||
Standard_EXPORT void SetShapeFixParameters(const DE_ShapeFixParameters& theParameters,
|
||||
const ParameterMap& theAdditionalParameters = {});
|
||||
const ParameterMap& theAdditionalParameters = {});
|
||||
|
||||
//! Returns parameters for shape processing that was set by SetParameters() method.
|
||||
//! @return the parameters for shape processing. Empty map if no parameters were set.
|
||||
@@ -249,161 +260,195 @@ protected:
|
||||
//! Returns True if succeeded, and False in case of fail
|
||||
//! If asOne is True, in case of multiple results composes
|
||||
//! them into assembly. Fills sequence of produced labels
|
||||
Standard_EXPORT Standard_Boolean Transfer (STEPControl_Reader& rd,
|
||||
const Standard_Integer num,
|
||||
const Handle(TDocStd_Document)& doc,
|
||||
TDF_LabelSequence& Lseq,
|
||||
const Standard_Boolean asOne = Standard_False,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
Standard_EXPORT Standard_Boolean
|
||||
Transfer(STEPControl_Reader& rd,
|
||||
const Standard_Integer num,
|
||||
const Handle(TDocStd_Document)& doc,
|
||||
TDF_LabelSequence& Lseq,
|
||||
const Standard_Boolean asOne = Standard_False,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
//! Add a shape to a document
|
||||
//! Depending on a case, this shape can be added as one, or
|
||||
//! as assembly, or (in case if it is associated with external
|
||||
//! reference) taken as that referred shape
|
||||
Standard_EXPORT TDF_Label AddShape (const TopoDS_Shape& S, const Handle(XCAFDoc_ShapeTool)& STool, const TopTools_MapOfShape& NewShapesMap, const STEPCAFControl_DataMapOfShapePD& ShapePDMap, const STEPCAFControl_DataMapOfPDExternFile& PDFileMap);
|
||||
|
||||
Standard_EXPORT TDF_Label AddShape(const TopoDS_Shape& S,
|
||||
const Handle(XCAFDoc_ShapeTool)& STool,
|
||||
const TopTools_MapOfShape& NewShapesMap,
|
||||
const STEPCAFControl_DataMapOfShapePD& ShapePDMap,
|
||||
const STEPCAFControl_DataMapOfPDExternFile& PDFileMap);
|
||||
|
||||
//! Reads (or if returns already read) extern file with
|
||||
//! given name
|
||||
Standard_EXPORT Handle(STEPCAFControl_ExternFile) ReadExternFile (const Standard_CString file,
|
||||
const Standard_CString fullpath,
|
||||
const Handle(TDocStd_Document)& doc,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
Standard_EXPORT Handle(STEPCAFControl_ExternFile) ReadExternFile(
|
||||
const Standard_CString file,
|
||||
const Standard_CString fullpath,
|
||||
const Handle(TDocStd_Document)& doc,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
//! Reads style assignments from STEP model and sets
|
||||
//! corresponding color assignments in the DECAF document
|
||||
Standard_EXPORT Standard_Boolean ReadColors
|
||||
(const Handle(XSControl_WorkSession)& WS,
|
||||
const Handle(TDocStd_Document)& doc,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors()) const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean
|
||||
ReadColors(const Handle(XSControl_WorkSession)& WS,
|
||||
const Handle(TDocStd_Document)& doc,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors()) const;
|
||||
|
||||
//! Reads names of parts defined in the STEP model and
|
||||
//! assigns them to corresponding labels in the DECAF document
|
||||
Standard_EXPORT Standard_Boolean ReadNames (const Handle(XSControl_WorkSession)& WS, const Handle(TDocStd_Document)& doc, const STEPCAFControl_DataMapOfPDExternFile& PDFileMap) const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean
|
||||
ReadNames(const Handle(XSControl_WorkSession)& WS,
|
||||
const Handle(TDocStd_Document)& doc,
|
||||
const STEPCAFControl_DataMapOfPDExternFile& PDFileMap) const;
|
||||
|
||||
//! Reads validation properties assigned to shapes in the STEP
|
||||
//! model and assigns them to corresponding labels in the DECAF
|
||||
//! document
|
||||
Standard_EXPORT Standard_Boolean ReadValProps (const Handle(XSControl_WorkSession)& WS,
|
||||
const Handle(TDocStd_Document)& doc,
|
||||
const STEPCAFControl_DataMapOfPDExternFile& PDFileMap,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors()) const;
|
||||
Standard_EXPORT Standard_Boolean
|
||||
ReadValProps(const Handle(XSControl_WorkSession)& WS,
|
||||
const Handle(TDocStd_Document)& doc,
|
||||
const STEPCAFControl_DataMapOfPDExternFile& PDFileMap,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors()) const;
|
||||
|
||||
//! Reads metadata assigned to shapes in the STEP model and
|
||||
//! assigns them to corresponding labels in the DECAF document
|
||||
Standard_EXPORT Standard_Boolean ReadMetadata(const Handle(XSControl_WorkSession)& theWS,
|
||||
const Handle(TDocStd_Document)& theDoc,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors()) const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean
|
||||
ReadMetadata(const Handle(XSControl_WorkSession)& theWS,
|
||||
const Handle(TDocStd_Document)& theDoc,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors()) const;
|
||||
|
||||
//! Reads layers of parts defined in the STEP model and
|
||||
//! set reference between shape and layers in the DECAF document
|
||||
Standard_EXPORT Standard_Boolean ReadLayers (const Handle(XSControl_WorkSession)& WS, const Handle(TDocStd_Document)& doc) const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean ReadLayers(const Handle(XSControl_WorkSession)& WS,
|
||||
const Handle(TDocStd_Document)& doc) const;
|
||||
|
||||
//! Reads SHUO for instances defined in the STEP model and
|
||||
//! set reference between shape instances from different assemblyes
|
||||
Standard_EXPORT Standard_Boolean ReadSHUOs (const Handle(XSControl_WorkSession)& WS, const Handle(TDocStd_Document)& doc, const STEPCAFControl_DataMapOfPDExternFile& PDFileMap) const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean
|
||||
ReadSHUOs(const Handle(XSControl_WorkSession)& WS,
|
||||
const Handle(TDocStd_Document)& doc,
|
||||
const STEPCAFControl_DataMapOfPDExternFile& PDFileMap) const;
|
||||
|
||||
//! Reads D> for instances defined in the STEP model and
|
||||
//! set reference between shape instances from different assemblyes
|
||||
Standard_EXPORT Standard_Boolean ReadGDTs (const Handle(XSControl_WorkSession)& WS,
|
||||
const Handle(TDocStd_Document)& doc,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
|
||||
Standard_EXPORT Standard_Boolean
|
||||
ReadGDTs(const Handle(XSControl_WorkSession)& WS,
|
||||
const Handle(TDocStd_Document)& doc,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
|
||||
//! Reads materials for instances defined in the STEP model and
|
||||
//! set reference between shape instances from different assemblyes
|
||||
Standard_EXPORT Standard_Boolean ReadMaterials (const Handle(XSControl_WorkSession)& WS,
|
||||
const Handle(TDocStd_Document)& doc,
|
||||
const Handle(TColStd_HSequenceOfTransient)& SeqPDS,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors()) const;
|
||||
|
||||
Standard_EXPORT Standard_Boolean
|
||||
ReadMaterials(const Handle(XSControl_WorkSession)& WS,
|
||||
const Handle(TDocStd_Document)& doc,
|
||||
const Handle(TColStd_HSequenceOfTransient)& SeqPDS,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors()) const;
|
||||
|
||||
//! Reads Views for instances defined in the STEP model
|
||||
Standard_EXPORT Standard_Boolean ReadViews(const Handle(XSControl_WorkSession)& theWS,
|
||||
const Handle(TDocStd_Document)& theDoc,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors()) const;
|
||||
Standard_EXPORT Standard_Boolean
|
||||
ReadViews(const Handle(XSControl_WorkSession)& theWS,
|
||||
const Handle(TDocStd_Document)& theDoc,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors()) const;
|
||||
|
||||
//! Populates the sub-Label of the passed TDF Label with shape
|
||||
//! data associated with the given STEP Representation Item,
|
||||
//! including naming and topological information.
|
||||
Standard_EXPORT TDF_Label SettleShapeData (const Handle(StepRepr_RepresentationItem)& theItem, const TDF_Label& theLab, const Handle(XCAFDoc_ShapeTool)& theShapeTool, const Handle(Transfer_TransientProcess)& theTP) const;
|
||||
|
||||
Standard_EXPORT TDF_Label SettleShapeData(const Handle(StepRepr_RepresentationItem)& theItem,
|
||||
const TDF_Label& theLab,
|
||||
const Handle(XCAFDoc_ShapeTool)& theShapeTool,
|
||||
const Handle(Transfer_TransientProcess)& theTP) const;
|
||||
|
||||
//! Given the maps of already translated shapes, this method
|
||||
//! expands their correspondent Labels in XDE Document so that
|
||||
//! to have a dedicated sub-Label for each sub-shape coming
|
||||
//! with associated name in its STEP Representation Item.
|
||||
Standard_EXPORT void ExpandSubShapes (const Handle(XCAFDoc_ShapeTool)& theShapeTool, const STEPCAFControl_DataMapOfShapePD& theShapePDMap) const;
|
||||
|
||||
Standard_EXPORT void ExpandSubShapes(const Handle(XCAFDoc_ShapeTool)& theShapeTool,
|
||||
const STEPCAFControl_DataMapOfShapePD& theShapePDMap) const;
|
||||
|
||||
//! Expands the topological structure of Manifold Solid BRep
|
||||
//! STEP entity to OCAF sub-tree. Entities having no names
|
||||
//! associated via their Representation Items are skipped.
|
||||
Standard_EXPORT void ExpandManifoldSolidBrep (TDF_Label& theLab, const Handle(StepRepr_RepresentationItem)& theItem, const Handle(Transfer_TransientProcess)& theTP, const Handle(XCAFDoc_ShapeTool)& theShapeTool) const;
|
||||
|
||||
Standard_EXPORT void ExpandManifoldSolidBrep(TDF_Label& theLab,
|
||||
const Handle(StepRepr_RepresentationItem)& theItem,
|
||||
const Handle(Transfer_TransientProcess)& theTP,
|
||||
const Handle(XCAFDoc_ShapeTool)& theShapeTool) const;
|
||||
|
||||
//! Expands the topological structure of Shell-Based Surface
|
||||
//! Model STEP entity to OCAF sub-tree. Entities having no names
|
||||
//! associated via their Representation Items are skipped.
|
||||
Standard_EXPORT void ExpandSBSM (TDF_Label& theLab, const Handle(StepRepr_RepresentationItem)& theItem, const Handle(Transfer_TransientProcess)& theTP, const Handle(XCAFDoc_ShapeTool)& theShapeTool) const;
|
||||
|
||||
Standard_EXPORT void ExpandSBSM(TDF_Label& theLab,
|
||||
const Handle(StepRepr_RepresentationItem)& theItem,
|
||||
const Handle(Transfer_TransientProcess)& theTP,
|
||||
const Handle(XCAFDoc_ShapeTool)& theShapeTool) const;
|
||||
|
||||
//! Expands STEP Shell structure to OCAF sub-tree. Entities
|
||||
//! having no names associated via their Representation Items
|
||||
//! are skipped.
|
||||
Standard_EXPORT void ExpandShell (const Handle(StepShape_ConnectedFaceSet)& theShell, TDF_Label& theLab, const Handle(Transfer_TransientProcess)& theTP, const Handle(XCAFDoc_ShapeTool)& theShapeTool) const;
|
||||
Standard_EXPORT void ExpandShell(const Handle(StepShape_ConnectedFaceSet)& theShell,
|
||||
TDF_Label& theLab,
|
||||
const Handle(Transfer_TransientProcess)& theTP,
|
||||
const Handle(XCAFDoc_ShapeTool)& theShapeTool) const;
|
||||
|
||||
//! Convert name into UNICODE text.
|
||||
Standard_EXPORT virtual TCollection_ExtendedString convertName (const TCollection_AsciiString& theName) const;
|
||||
Standard_EXPORT virtual TCollection_ExtendedString convertName(
|
||||
const TCollection_AsciiString& theName) const;
|
||||
|
||||
private:
|
||||
//! Internal method. Import all Datum attributes and set them to XCAF object. Set connection of Datum to GeomTolerance (theGDTL).
|
||||
//! Internal method. Import all Datum attributes and set them to XCAF object. Set connection of
|
||||
//! Datum to GeomTolerance (theGDTL).
|
||||
Standard_Boolean setDatumToXCAF(const Handle(StepDimTol_Datum)& theDat,
|
||||
const TDF_Label theGDTL,
|
||||
const Standard_Integer thePositionCounter,
|
||||
const XCAFDimTolObjects_DatumModifiersSequence& theXCAFModifiers,
|
||||
const XCAFDimTolObjects_DatumModifWithValue theXCAFModifWithVal,
|
||||
const Standard_Real theModifValue,
|
||||
const Handle(TDocStd_Document)& theDoc,
|
||||
const Handle(XSControl_WorkSession)& theWS,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
|
||||
const TDF_Label theGDTL,
|
||||
const Standard_Integer thePositionCounter,
|
||||
const XCAFDimTolObjects_DatumModifiersSequence& theXCAFModifiers,
|
||||
const XCAFDimTolObjects_DatumModifWithValue theXCAFModifWithVal,
|
||||
const Standard_Real theModifValue,
|
||||
const Handle(TDocStd_Document)& theDoc,
|
||||
const Handle(XSControl_WorkSession)& theWS,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
|
||||
//! Internal method. Read Datums, connected to GeomTolerance theGDTL.
|
||||
Standard_Boolean readDatumsAP242(const Handle(Standard_Transient)& theEnt,
|
||||
const TDF_Label theGDTL,
|
||||
const Handle(TDocStd_Document)& theDoc,
|
||||
const Handle(XSControl_WorkSession)& theWS,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
Standard_Boolean readDatumsAP242(const Handle(Standard_Transient)& theEnt,
|
||||
const TDF_Label theGDTL,
|
||||
const Handle(TDocStd_Document)& theDoc,
|
||||
const Handle(XSControl_WorkSession)& theWS,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
|
||||
//! Internal method. Read Dimension or GeomTolerance.
|
||||
TDF_Label createGDTObjectInXCAF(const Handle(Standard_Transient)& theEnt,
|
||||
const Handle(TDocStd_Document)& theDoc,
|
||||
const Handle(XSControl_WorkSession)& theWS,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
TDF_Label createGDTObjectInXCAF(const Handle(Standard_Transient)& theEnt,
|
||||
const Handle(TDocStd_Document)& theDoc,
|
||||
const Handle(XSControl_WorkSession)& theWS,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
|
||||
//! Prepares units for transfer
|
||||
void prepareUnits(const Handle(StepData_StepModel)& theModel,
|
||||
const Handle(TDocStd_Document)& theDoc,
|
||||
StepData_Factors& theLocalFactors) const;
|
||||
const Handle(TDocStd_Document)& theDoc,
|
||||
StepData_Factors& theLocalFactors) const;
|
||||
|
||||
//! Find RepresentationItems
|
||||
Standard_Boolean findReprItems(const Handle(XSControl_WorkSession) & theWS,
|
||||
const Handle(StepShape_ShapeDefinitionRepresentation) & theShDefRepr,
|
||||
NCollection_List<Handle(Transfer_Binder)>& theBinders) const;
|
||||
Standard_Boolean findReprItems(
|
||||
const Handle(XSControl_WorkSession)& theWS,
|
||||
const Handle(StepShape_ShapeDefinitionRepresentation)& theShDefRepr,
|
||||
NCollection_List<Handle(Transfer_Binder)>& theBinders) const;
|
||||
|
||||
//! Fill metadata
|
||||
Standard_Boolean fillAttributes(const Handle(XSControl_WorkSession)& theWS,
|
||||
Standard_Boolean fillAttributes(const Handle(XSControl_WorkSession)& theWS,
|
||||
const Handle(StepRepr_PropertyDefinition)& thePropDef,
|
||||
const StepData_Factors& theLocalFactors,
|
||||
Handle(TDataStd_NamedData)& theAttr) const;
|
||||
const StepData_Factors& theLocalFactors,
|
||||
Handle(TDataStd_NamedData)& theAttr) const;
|
||||
|
||||
private:
|
||||
STEPControl_Reader myReader;
|
||||
STEPControl_Reader myReader;
|
||||
NCollection_DataMap<TCollection_AsciiString, Handle(STEPCAFControl_ExternFile)> myFiles;
|
||||
XCAFDoc_DataMapOfShapeLabel myMap;
|
||||
Standard_Boolean myColorMode;
|
||||
Standard_Boolean myNameMode;
|
||||
Standard_Boolean myLayerMode;
|
||||
Standard_Boolean myPropsMode;
|
||||
Standard_Boolean myMetaMode;
|
||||
Standard_Boolean mySHUOMode;
|
||||
Standard_Boolean myGDTMode;
|
||||
Standard_Boolean myMatMode;
|
||||
Standard_Boolean myViewMode;
|
||||
NCollection_DataMap<Handle(Standard_Transient), TDF_Label> myGDTMap;
|
||||
XCAFDoc_DataMapOfShapeLabel myMap;
|
||||
Standard_Boolean myColorMode;
|
||||
Standard_Boolean myNameMode;
|
||||
Standard_Boolean myLayerMode;
|
||||
Standard_Boolean myPropsMode;
|
||||
Standard_Boolean myMetaMode;
|
||||
Standard_Boolean mySHUOMode;
|
||||
Standard_Boolean myGDTMode;
|
||||
Standard_Boolean myMatMode;
|
||||
Standard_Boolean myViewMode;
|
||||
NCollection_DataMap<Handle(Standard_Transient), TDF_Label> myGDTMap;
|
||||
};
|
||||
|
||||
#endif // _STEPCAFControl_Reader_HeaderFile
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -52,7 +52,7 @@ class STEPCAFControl_Writer
|
||||
public:
|
||||
DEFINE_STANDARD_ALLOC
|
||||
|
||||
using ParameterMap = STEPControl_Writer::ParameterMap;
|
||||
using ParameterMap = STEPControl_Writer::ParameterMap;
|
||||
using ProcessingFlags = STEPControl_Writer::ProcessingFlags;
|
||||
|
||||
public:
|
||||
@@ -70,7 +70,7 @@ public:
|
||||
//! Clears the internal data structures and attaches to a new session
|
||||
//! Clears the session if it was not yet set for STEP
|
||||
Standard_EXPORT void Init(const Handle(XSControl_WorkSession)& theWS,
|
||||
const Standard_Boolean theScratch = Standard_True);
|
||||
const Standard_Boolean theScratch = Standard_True);
|
||||
|
||||
//! Writes all the produced models into file
|
||||
//! In case of multimodel with extern references,
|
||||
@@ -89,10 +89,11 @@ public:
|
||||
//! 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)& theDoc,
|
||||
const STEPControl_StepModelType theMode = STEPControl_AsIs,
|
||||
const Standard_CString theIsMulti = 0,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
Standard_EXPORT Standard_Boolean
|
||||
Transfer(const Handle(TDocStd_Document)& theDoc,
|
||||
const STEPControl_StepModelType theMode = STEPControl_AsIs,
|
||||
const Standard_CString theIsMulti = 0,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
//! Transfers a document (or single label) to a STEP model
|
||||
//! This method uses if need to set parameters avoiding
|
||||
@@ -104,73 +105,85 @@ public:
|
||||
//! gives prefix for names of extern files (can be empty string)
|
||||
//! @param theProgress progress indicator
|
||||
//! Returns True if translation is OK
|
||||
Standard_EXPORT Standard_Boolean Transfer(const Handle(TDocStd_Document)& theDoc,
|
||||
const DESTEP_Parameters& theParams,
|
||||
const STEPControl_StepModelType theMode = STEPControl_AsIs,
|
||||
const Standard_CString theIsMulti = 0,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
Standard_EXPORT Standard_Boolean
|
||||
Transfer(const Handle(TDocStd_Document)& theDoc,
|
||||
const DESTEP_Parameters& theParams,
|
||||
const STEPControl_StepModelType theMode = STEPControl_AsIs,
|
||||
const Standard_CString theIsMulti = 0,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
//! Method to transfer part of the document specified by label
|
||||
Standard_EXPORT Standard_Boolean Transfer(const TDF_Label& theLabel,
|
||||
const STEPControl_StepModelType theMode = STEPControl_AsIs,
|
||||
const Standard_CString theIsMulti = 0,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
Standard_EXPORT Standard_Boolean
|
||||
Transfer(const TDF_Label& theLabel,
|
||||
const STEPControl_StepModelType theMode = STEPControl_AsIs,
|
||||
const Standard_CString theIsMulti = 0,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
//! Method to transfer part of the document specified by label
|
||||
//! This method uses if need to set parameters avoiding
|
||||
//! initialization from Interface_Static
|
||||
Standard_EXPORT Standard_Boolean Transfer(const TDF_Label& theLabel,
|
||||
const DESTEP_Parameters& theParams,
|
||||
const STEPControl_StepModelType theMode = STEPControl_AsIs,
|
||||
const Standard_CString theIsMulti = 0,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
Standard_EXPORT Standard_Boolean
|
||||
Transfer(const TDF_Label& theLabel,
|
||||
const DESTEP_Parameters& theParams,
|
||||
const STEPControl_StepModelType theMode = STEPControl_AsIs,
|
||||
const Standard_CString theIsMulti = 0,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
//! Mehod to writing sequence of root assemblies or part of the file specified by use by one label
|
||||
Standard_EXPORT Standard_Boolean Transfer(const TDF_LabelSequence& theLabelSeq,
|
||||
const STEPControl_StepModelType theMode = STEPControl_AsIs,
|
||||
const Standard_CString theIsMulti = 0,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
//! Mehod to writing sequence of root assemblies or part of the file specified by use by one label
|
||||
Standard_EXPORT Standard_Boolean
|
||||
Transfer(const TDF_LabelSequence& theLabelSeq,
|
||||
const STEPControl_StepModelType theMode = STEPControl_AsIs,
|
||||
const Standard_CString theIsMulti = 0,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
//! Mehod to writing sequence of root assemblies or part of the file specified by use by one label
|
||||
//! Mehod to writing sequence of root assemblies or part of the file specified by use by one label
|
||||
//! This method uses if need to set parameters avoiding
|
||||
//! initialization from Interface_Static
|
||||
Standard_EXPORT Standard_Boolean Transfer(const TDF_LabelSequence& theLabelSeq,
|
||||
const DESTEP_Parameters& theParams,
|
||||
const STEPControl_StepModelType theMode = STEPControl_AsIs,
|
||||
const Standard_CString theIsMulti = 0,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
Standard_EXPORT Standard_Boolean
|
||||
Transfer(const TDF_LabelSequence& theLabelSeq,
|
||||
const DESTEP_Parameters& theParams,
|
||||
const STEPControl_StepModelType theMode = STEPControl_AsIs,
|
||||
const Standard_CString theIsMulti = 0,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
Standard_EXPORT Standard_Boolean Perform(const Handle(TDocStd_Document)& theDoc,
|
||||
const TCollection_AsciiString& theFileName,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
Standard_EXPORT Standard_Boolean
|
||||
Perform(const Handle(TDocStd_Document)& theDoc,
|
||||
const TCollection_AsciiString& theFileName,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
//! Transfers a document and writes it to a STEP file
|
||||
//! Returns True if translation is OK
|
||||
Standard_EXPORT Standard_Boolean Perform(const Handle(TDocStd_Document)& theDoc,
|
||||
const Standard_CString theFileName,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
Standard_EXPORT Standard_Boolean
|
||||
Perform(const Handle(TDocStd_Document)& theDoc,
|
||||
const Standard_CString theFileName,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
//! Transfers a document and writes it to a STEP file
|
||||
//! This method uses if need to set parameters avoiding
|
||||
//! initialization from Interface_Static
|
||||
//! Returns True if translation is OK
|
||||
Standard_EXPORT Standard_Boolean Perform(const Handle(TDocStd_Document)& theDoc,
|
||||
const Standard_CString theFileName,
|
||||
const DESTEP_Parameters& theParams,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
Standard_EXPORT Standard_Boolean
|
||||
Perform(const Handle(TDocStd_Document)& theDoc,
|
||||
const Standard_CString theFileName,
|
||||
const DESTEP_Parameters& theParams,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
//! Returns data on external files
|
||||
//! Returns Null handle if no external files are read
|
||||
const NCollection_DataMap<TCollection_AsciiString, Handle(STEPCAFControl_ExternFile)>& ExternFiles() const { return myFiles; };
|
||||
const NCollection_DataMap<TCollection_AsciiString, Handle(STEPCAFControl_ExternFile)>&
|
||||
ExternFiles() const
|
||||
{
|
||||
return myFiles;
|
||||
};
|
||||
|
||||
//! Returns data on external file by its original label
|
||||
//! Returns False if no external file with given name is read
|
||||
Standard_EXPORT Standard_Boolean ExternFile(const TDF_Label& theLabel,
|
||||
Standard_EXPORT Standard_Boolean ExternFile(const TDF_Label& theLabel,
|
||||
Handle(STEPCAFControl_ExternFile)& theExtFile) const;
|
||||
|
||||
//! Returns data on external file by its name
|
||||
//! Returns False if no external file with given name is read
|
||||
Standard_EXPORT Standard_Boolean ExternFile(const Standard_CString theName,
|
||||
Standard_EXPORT Standard_Boolean ExternFile(const Standard_CString theName,
|
||||
Handle(STEPCAFControl_ExternFile)& theExtFile) const;
|
||||
|
||||
//! Returns basic reader for root file
|
||||
@@ -230,7 +243,7 @@ public:
|
||||
//! @param theParameters the parameters for shape processing.
|
||||
//! @param theAdditionalParameters the additional parameters for shape processing.
|
||||
Standard_EXPORT void SetShapeFixParameters(const DE_ShapeFixParameters& theParameters,
|
||||
const ParameterMap& theAdditionalParameters = {});
|
||||
const ParameterMap& theAdditionalParameters = {});
|
||||
|
||||
//! Returns parameters for shape processing that was set by SetParameters() method.
|
||||
//! @return the parameters for shape processing. Empty map if no parameters were set.
|
||||
@@ -249,12 +262,12 @@ protected:
|
||||
//! Transfers labels to a STEP model
|
||||
//! Returns True if translation is OK
|
||||
//! isExternFile setting from transferExternFiles method
|
||||
Standard_Boolean transfer(STEPControl_Writer& theWriter,
|
||||
const TDF_LabelSequence& theLabels,
|
||||
const STEPControl_StepModelType theMode = STEPControl_AsIs,
|
||||
const Standard_CString theIsMulti = 0,
|
||||
const Standard_Boolean isExternFile = Standard_False,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
Standard_Boolean transfer(STEPControl_Writer& theWriter,
|
||||
const TDF_LabelSequence& theLabels,
|
||||
const STEPControl_StepModelType theMode = STEPControl_AsIs,
|
||||
const Standard_CString theIsMulti = 0,
|
||||
const Standard_Boolean isExternFile = Standard_False,
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
//! Parses assembly structure of label L, writes all the simple
|
||||
//! shapes each to its own file named by name of its label plus
|
||||
@@ -262,115 +275,116 @@ protected:
|
||||
//! Returns shape representing that assembly structure
|
||||
//! in the form of nested empty compounds (and a sequence of
|
||||
//! labels which are newly written nodes of this assembly)
|
||||
TopoDS_Shape transferExternFiles(const TDF_Label& theLabel,
|
||||
const STEPControl_StepModelType theMode,
|
||||
TDF_LabelSequence& theLabelSeq,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors(),
|
||||
const Standard_CString thePrefix = "",
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
TopoDS_Shape transferExternFiles(
|
||||
const TDF_Label& theLabel,
|
||||
const STEPControl_StepModelType theMode,
|
||||
TDF_LabelSequence& theLabelSeq,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors(),
|
||||
const Standard_CString thePrefix = "",
|
||||
const Message_ProgressRange& theProgress = Message_ProgressRange());
|
||||
|
||||
//! Write external references to STEP
|
||||
Standard_Boolean writeExternRefs(const Handle(XSControl_WorkSession)& theWS,
|
||||
const TDF_LabelSequence& theLabels) const;
|
||||
const TDF_LabelSequence& theLabels) const;
|
||||
|
||||
//! Write colors assigned to specified labels, to STEP model
|
||||
Standard_Boolean writeColors(const Handle(XSControl_WorkSession)& theWS,
|
||||
const TDF_LabelSequence& theLabels);
|
||||
const TDF_LabelSequence& theLabels);
|
||||
|
||||
//! Write names assigned to specified labels, to STEP model
|
||||
Standard_Boolean writeNames(const Handle(XSControl_WorkSession)& theWS,
|
||||
const TDF_LabelSequence& theLabels) const;
|
||||
const TDF_LabelSequence& theLabels) const;
|
||||
|
||||
//! Write D>s assigned to specified labels, to STEP model
|
||||
Standard_Boolean writeDGTs(const Handle(XSControl_WorkSession)& theWS,
|
||||
const TDF_LabelSequence& theLabels) const;
|
||||
const TDF_LabelSequence& theLabels) const;
|
||||
|
||||
//! Write D>s assigned to specified labels, to STEP model, according AP242
|
||||
Standard_Boolean writeDGTsAP242(const Handle(XSControl_WorkSession)& theWS,
|
||||
const TDF_LabelSequence& theLabels,
|
||||
const TDF_LabelSequence& theLabels,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
|
||||
//! Write materials assigned to specified labels, to STEP model
|
||||
Standard_Boolean writeMaterials(const Handle(XSControl_WorkSession)& theWS,
|
||||
const TDF_LabelSequence& theLabels) const;
|
||||
const TDF_LabelSequence& theLabels) const;
|
||||
|
||||
//! Write validation properties assigned to specified labels,
|
||||
//! to STEP model
|
||||
Standard_Boolean writeValProps(const Handle(XSControl_WorkSession)& theWS,
|
||||
const TDF_LabelSequence& theLabels,
|
||||
const Standard_CString theIsMulti) const;
|
||||
const TDF_LabelSequence& theLabels,
|
||||
const Standard_CString theIsMulti) const;
|
||||
|
||||
//! Write layers assigned to specified labels, to STEP model
|
||||
Standard_Boolean writeLayers(const Handle(XSControl_WorkSession)& theWS,
|
||||
const TDF_LabelSequence& theLabels) const;
|
||||
const TDF_LabelSequence& theLabels) const;
|
||||
|
||||
//! Write SHUO assigned to specified component, to STEP model
|
||||
Standard_Boolean writeSHUOs(const Handle(XSControl_WorkSession)& theWS,
|
||||
const TDF_LabelSequence& theLabels);
|
||||
const TDF_LabelSequence& theLabels);
|
||||
|
||||
//! Finds length units located in root of label
|
||||
//! If it exists, initializes local length unit from it
|
||||
//! Else initializes according to Cascade length unit
|
||||
void prepareUnit(const TDF_Label& theLabel,
|
||||
void prepareUnit(const TDF_Label& theLabel,
|
||||
const Handle(StepData_StepModel)& theModel,
|
||||
StepData_Factors& theLocalFactors);
|
||||
StepData_Factors& theLocalFactors);
|
||||
|
||||
Handle(StepRepr_ShapeAspect) writeShapeAspect(const Handle(XSControl_WorkSession)& theWS,
|
||||
const TDF_Label theLabel,
|
||||
const TopoDS_Shape& theShape,
|
||||
Handle(StepRepr_RepresentationContext)& theRC,
|
||||
Handle(StepAP242_GeometricItemSpecificUsage)& theGISU);
|
||||
Handle(StepRepr_ShapeAspect) writeShapeAspect(
|
||||
const Handle(XSControl_WorkSession)& theWS,
|
||||
const TDF_Label theLabel,
|
||||
const TopoDS_Shape& theShape,
|
||||
Handle(StepRepr_RepresentationContext)& theRC,
|
||||
Handle(StepAP242_GeometricItemSpecificUsage)& theGISU);
|
||||
|
||||
void writePresentation(const Handle(XSControl_WorkSession)& theWS,
|
||||
const TopoDS_Shape& thePresentation,
|
||||
void writePresentation(const Handle(XSControl_WorkSession)& theWS,
|
||||
const TopoDS_Shape& thePresentation,
|
||||
const Handle(TCollection_HAsciiString)& thePrsName,
|
||||
const Standard_Boolean theHasSemantic,
|
||||
const Standard_Boolean theHasPlane,
|
||||
const gp_Ax2& theAnnotationPlane,
|
||||
const gp_Pnt& theTextPosition,
|
||||
const Handle(Standard_Transient)& theDimension,
|
||||
const Standard_Boolean theHasSemantic,
|
||||
const Standard_Boolean theHasPlane,
|
||||
const gp_Ax2& theAnnotationPlane,
|
||||
const gp_Pnt& theTextPosition,
|
||||
const Handle(Standard_Transient)& theDimension,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
|
||||
Handle(StepDimTol_Datum) writeDatumAP242(const Handle(XSControl_WorkSession)& theWS,
|
||||
const TDF_LabelSequence& theShapeL,
|
||||
const TDF_Label& theDatumL,
|
||||
const Standard_Boolean isFirstDTarget,
|
||||
const Handle(StepDimTol_Datum)& theWrittenDatum,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
Handle(StepDimTol_Datum) writeDatumAP242(
|
||||
const Handle(XSControl_WorkSession)& theWS,
|
||||
const TDF_LabelSequence& theShapeL,
|
||||
const TDF_Label& theDatumL,
|
||||
const Standard_Boolean isFirstDTarget,
|
||||
const Handle(StepDimTol_Datum)& theWrittenDatum,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
|
||||
void writeToleranceZone(const Handle(XSControl_WorkSession)& theWS,
|
||||
void writeToleranceZone(const Handle(XSControl_WorkSession)& theWS,
|
||||
const Handle(XCAFDimTolObjects_GeomToleranceObject)& theObject,
|
||||
const Handle(StepDimTol_GeometricTolerance)& theEntity,
|
||||
const Handle(StepRepr_RepresentationContext)& theRC);
|
||||
const Handle(StepDimTol_GeometricTolerance)& theEntity,
|
||||
const Handle(StepRepr_RepresentationContext)& theRC);
|
||||
|
||||
void writeGeomTolerance(const Handle(XSControl_WorkSession)& theWS,
|
||||
const TDF_LabelSequence& theShapeSeqL,
|
||||
const TDF_Label& theGeomTolL,
|
||||
void writeGeomTolerance(const Handle(XSControl_WorkSession)& theWS,
|
||||
const TDF_LabelSequence& theShapeSeqL,
|
||||
const TDF_Label& theGeomTolL,
|
||||
const Handle(StepDimTol_HArray1OfDatumSystemOrReference)& theDatumSystem,
|
||||
const Handle(StepRepr_RepresentationContext)& theRC,
|
||||
const Handle(StepRepr_RepresentationContext)& theRC,
|
||||
const StepData_Factors& theLocalFactors = StepData_Factors());
|
||||
|
||||
private:
|
||||
|
||||
STEPControl_Writer myWriter;
|
||||
STEPControl_Writer myWriter;
|
||||
NCollection_DataMap<TCollection_AsciiString, Handle(STEPCAFControl_ExternFile)> myFiles;
|
||||
TDF_LabelMap myRootLabels;
|
||||
STEPCAFControl_DataMapOfLabelShape myLabels;
|
||||
STEPCAFControl_DataMapOfLabelExternFile myLabEF;
|
||||
STEPCAFControl_DataMapOfLabelShape myPureRefLabels;
|
||||
Standard_Boolean myColorMode;
|
||||
Standard_Boolean myNameMode;
|
||||
Standard_Boolean myLayerMode;
|
||||
Standard_Boolean myPropsMode;
|
||||
Standard_Boolean mySHUOMode;
|
||||
MoniTool_DataMapOfShapeTransient myMapCompMDGPR;
|
||||
Standard_Boolean myGDTMode;
|
||||
Standard_Boolean myMatMode;
|
||||
NCollection_Vector<Handle(StepRepr_RepresentationItem)> myGDTAnnotations;
|
||||
Handle(StepVisual_DraughtingModel) myGDTPresentationDM;
|
||||
TDF_LabelMap myRootLabels;
|
||||
STEPCAFControl_DataMapOfLabelShape myLabels;
|
||||
STEPCAFControl_DataMapOfLabelExternFile myLabEF;
|
||||
STEPCAFControl_DataMapOfLabelShape myPureRefLabels;
|
||||
Standard_Boolean myColorMode;
|
||||
Standard_Boolean myNameMode;
|
||||
Standard_Boolean myLayerMode;
|
||||
Standard_Boolean myPropsMode;
|
||||
Standard_Boolean mySHUOMode;
|
||||
MoniTool_DataMapOfShapeTransient myMapCompMDGPR;
|
||||
Standard_Boolean myGDTMode;
|
||||
Standard_Boolean myMatMode;
|
||||
NCollection_Vector<Handle(StepRepr_RepresentationItem)> myGDTAnnotations;
|
||||
Handle(StepVisual_DraughtingModel) myGDTPresentationDM;
|
||||
Handle(StepVisual_HArray1OfPresentationStyleAssignment) myGDTPrsCurveStyle;
|
||||
Handle(StepRepr_ProductDefinitionShape) myGDTCommonPDS;
|
||||
|
||||
Handle(StepRepr_ProductDefinitionShape) myGDTCommonPDS;
|
||||
};
|
||||
|
||||
#endif // _STEPCAFControl_Writer_HeaderFile
|
||||
|
Reference in New Issue
Block a user