Part: Add deprecation warning for import/export
This commit is contained in:
committed by
Chris Hennes
parent
cde481536e
commit
deadbb5793
@@ -111,6 +111,8 @@
|
||||
# include "FT2FC.h"
|
||||
#endif
|
||||
|
||||
FC_LOG_LEVEL_INIT("Part")
|
||||
|
||||
extern const char* BRepBuilderAPI_FaceErrorText(BRepBuilderAPI_FaceError fe);
|
||||
|
||||
namespace Part {
|
||||
@@ -784,6 +786,7 @@ private:
|
||||
pcDoc->recompute();
|
||||
}
|
||||
else {
|
||||
FC_WARN("Importing BREP via 'Part' is deprecated. Use 'ImportGui' instead.");
|
||||
TopoShape shape;
|
||||
shape.read(EncodedName.c_str());
|
||||
|
||||
|
||||
@@ -40,17 +40,20 @@
|
||||
# include <XSControl_WorkSession.hxx>
|
||||
#endif
|
||||
|
||||
#include <Base/Console.h>
|
||||
#include <App/Document.h>
|
||||
#include <Base/Sequencer.h>
|
||||
|
||||
#include "ImportIges.h"
|
||||
#include "PartFeature.h"
|
||||
|
||||
FC_LOG_LEVEL_INIT("Part")
|
||||
|
||||
using namespace Part;
|
||||
|
||||
int Part::ImportIgesParts(App::Document *pcDoc, const char* FileName)
|
||||
{
|
||||
FC_WARN("Importing IGES via 'Part' is deprecated. Use 'ImportGui' instead.");
|
||||
try {
|
||||
Base::FileInfo fi(FileName);
|
||||
// read iges file
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
#include "ShapeMapHasher.h"
|
||||
#include "PartFeature.h"
|
||||
|
||||
FC_LOG_LEVEL_INIT("Part")
|
||||
|
||||
namespace Part {
|
||||
bool ReadColors (const Handle(XSControl_WorkSession) &WS, std::map<int, Quantity_Color>& hash_col);
|
||||
@@ -68,6 +69,8 @@ int Part::ImportStepParts(App::Document *pcDoc, const char* Name)
|
||||
TopoDS_Shape aShape;
|
||||
Base::FileInfo fi(Name);
|
||||
|
||||
FC_WARN("Importing STEP via 'Part' is deprecated. Use 'ImportGui' instead.");
|
||||
|
||||
if (!fi.exists()) {
|
||||
std::stringstream str;
|
||||
str << "File '" << Name << "' does not exist!";
|
||||
|
||||
Reference in New Issue
Block a user