Salome HOME
projects
/
modules
/
shaper.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Issue #1112 tab key doesn't work on the last field of left panels
[modules/shaper.git]
/
src
/
GeomAlgoAPI
/
GeomAlgoAPI_IGESImport.cpp
diff --git
a/src/GeomAlgoAPI/GeomAlgoAPI_IGESImport.cpp
b/src/GeomAlgoAPI/GeomAlgoAPI_IGESImport.cpp
index 8e20cb32aec65b37fb6cbe8b2551efb1605bdeaa..79830e43f221a0ec7b79b3de7f4699ba767ad515 100644
(file)
--- a/
src/GeomAlgoAPI/GeomAlgoAPI_IGESImport.cpp
+++ b/
src/GeomAlgoAPI/GeomAlgoAPI_IGESImport.cpp
@@
-1,7
+1,13
@@
// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+// File: GEOMALGOAPI_IGESImport.cpp
+// Created: May 14, 2015
+// Author: Sergey POKHODENKO
+
#include <GeomAlgoAPI_IGESImport.h>
#include <GeomAlgoAPI_IGESImport.h>
+#include <TopoDS_Shape.hxx>
+
// OOCT includes
#include <IGESControl_Reader.hxx>
#include <IGESData_IGESModel.hxx>
// OOCT includes
#include <IGESControl_Reader.hxx>
#include <IGESData_IGESModel.hxx>
@@
-11,19
+17,17
@@
*
*/
//=============================================================================
*
*/
//=============================================================================
-//extern "C" {
-namespace IGESImport {
-TopoDS_Shape Import(const TCollection_AsciiString& theFileName,
- const TCollection_AsciiString&,
- TCollection_AsciiString& theError)
+std::shared_ptr<GeomAPI_Shape> IGESImport(const std::string& theFileName,
+ const std::string&,
+ std::string& theError)
{
#ifdef _DEBUG
std::cout << "Import IGES from file " << theFileName << std::endl;
#endif
{
#ifdef _DEBUG
std::cout << "Import IGES from file " << theFileName << std::endl;
#endif
- TopoDS_Shape a
Res
Shape;
+ TopoDS_Shape aShape;
IGESControl_Reader aReader;
try {
IGESControl_Reader aReader;
try {
- IFSelect_ReturnStatus status = aReader.ReadFile( theFileName.
ToCString
() );
+ IFSelect_ReturnStatus status = aReader.ReadFile( theFileName.
c_str
() );
if (status == IFSelect_RetDone) {
#ifdef _DEBUG
if (status == IFSelect_RetDone) {
#ifdef _DEBUG
@@
-35,7
+39,7
@@
TopoDS_Shape Import(const TCollection_AsciiString& theFileName,
#ifdef _DEBUG
std::cout << "ImportIGES : count of shapes produced = " << aReader.NbShapes() << std::endl;
#endif
#ifdef _DEBUG
std::cout << "ImportIGES : count of shapes produced = " << aReader.NbShapes() << std::endl;
#endif
- a
Res
Shape = aReader.OneShape();
+ aShape = aReader.OneShape();
}
else {
switch (status) {
}
else {
switch (status) {
@@
-55,17
+59,16
@@
TopoDS_Shape Import(const TCollection_AsciiString& theFileName,
theError = "Wrong format of the imported file. Can't import file.";
break;
}
theError = "Wrong format of the imported file. Can't import file.";
break;
}
- a
Res
Shape.Nullify();
+ aShape.Nullify();
}
}
catch( Standard_Failure ) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
theError = aFail->GetMessageString();
}
}
catch( Standard_Failure ) {
Handle(Standard_Failure) aFail = Standard_Failure::Caught();
theError = aFail->GetMessageString();
- a
Res
Shape.Nullify();
+ aShape.Nullify();
}
}
-
return aResShape
;
-}
-
+
std::shared_ptr<GeomAPI_Shape> aGeomShape(new GeomAPI_Shape)
;
+ aGeomShape->setImpl(new TopoDS_Shape(aShape));
+ return aGeomShape;
}
}
-//}