Remove support to oldest occ <7.5 (#20084)
* remove support to oldest occ <7.5 The os ubuntu 22.04 not supported use occ 7.5.1. There is a lot of code implemented to support even older versions. The patch removes support for versions lower than occ 7.5.0 * . * move include library #pieterhijma change request : * removed deprecated functions get/setAngle functions has been removed with OCC 7.5
This commit is contained in:
@@ -180,7 +180,6 @@
|
||||
#include "Interface.h"
|
||||
#include "modelRefine.h"
|
||||
#include "PartPyCXX.h"
|
||||
#include "ProgressIndicator.h"
|
||||
#include "Tools.h"
|
||||
#include "TopoShapeCompoundPy.h"
|
||||
#include "TopoShapeCompSolidPy.h"
|
||||
@@ -721,21 +720,11 @@ void TopoShape::importIges(const char *FileName)
|
||||
if (aReader.ReadFile(encodeFilename(FileName).c_str()) != IFSelect_RetDone)
|
||||
throw Base::FileException("Error in reading IGES");
|
||||
|
||||
#if OCC_VERSION_HEX < 0x070500
|
||||
Handle(Message_ProgressIndicator) pi = new ProgressIndicator(100);
|
||||
pi->NewScope(100, "Reading IGES file...");
|
||||
pi->Show();
|
||||
aReader.WS()->MapReader()->SetProgress(pi);
|
||||
#endif
|
||||
|
||||
// make brep
|
||||
aReader.ClearShapes();
|
||||
aReader.TransferRoots();
|
||||
// one shape that contains all subshapes
|
||||
this->_Shape = aReader.OneShape();
|
||||
#if OCC_VERSION_HEX < 0x070500
|
||||
pi->EndScope();
|
||||
#endif
|
||||
}
|
||||
catch (Standard_Failure& e) {
|
||||
throw Base::CADKernelError(e.GetMessageString());
|
||||
@@ -749,20 +738,10 @@ void TopoShape::importStep(const char *FileName)
|
||||
if (aReader.ReadFile(encodeFilename(FileName).c_str()) != IFSelect_RetDone)
|
||||
throw Base::FileException("Error in reading STEP");
|
||||
|
||||
#if OCC_VERSION_HEX < 0x070500
|
||||
Handle(Message_ProgressIndicator) pi = new ProgressIndicator(100);
|
||||
aReader.WS()->MapReader()->SetProgress(pi);
|
||||
pi->NewScope(100, "Reading STEP file...");
|
||||
pi->Show();
|
||||
#endif
|
||||
|
||||
// Root transfers
|
||||
aReader.TransferRoots();
|
||||
// one shape that contains all subshapes
|
||||
this->_Shape = aReader.OneShape();
|
||||
#if OCC_VERSION_HEX < 0x070500
|
||||
pi->EndScope();
|
||||
#endif
|
||||
}
|
||||
catch (Standard_Failure& e) {
|
||||
throw Base::CADKernelError(e.GetMessageString());
|
||||
@@ -775,15 +754,7 @@ void TopoShape::importBrep(const char *FileName)
|
||||
// read brep-file
|
||||
BRep_Builder aBuilder;
|
||||
TopoDS_Shape aShape;
|
||||
#if OCC_VERSION_HEX < 0x070500
|
||||
Handle(Message_ProgressIndicator) pi = new ProgressIndicator(100);
|
||||
pi->NewScope(100, "Reading BREP file...");
|
||||
pi->Show();
|
||||
BRepTools::Read(aShape,encodeFilename(FileName).c_str(),aBuilder,pi);
|
||||
pi->EndScope();
|
||||
#else
|
||||
BRepTools::Read(aShape,static_cast<Standard_CString>(FileName),aBuilder);
|
||||
#endif
|
||||
this->_Shape = aShape;
|
||||
}
|
||||
catch (Standard_Failure& e) {
|
||||
@@ -797,21 +768,8 @@ void TopoShape::importBrep(std::istream& str, int indicator)
|
||||
// read brep-file
|
||||
BRep_Builder aBuilder;
|
||||
TopoDS_Shape aShape;
|
||||
#if OCC_VERSION_HEX < 0x070500
|
||||
if (indicator) {
|
||||
Handle(Message_ProgressIndicator) pi = new ProgressIndicator(100);
|
||||
pi->NewScope(100, "Reading BREP file...");
|
||||
pi->Show();
|
||||
BRepTools::Read(aShape,str,aBuilder,pi);
|
||||
pi->EndScope();
|
||||
}
|
||||
else {
|
||||
BRepTools::Read(aShape,str,aBuilder);
|
||||
}
|
||||
#else
|
||||
(void)indicator;
|
||||
BRepTools::Read(aShape,str,aBuilder);
|
||||
#endif
|
||||
this->_Shape = aShape;
|
||||
}
|
||||
catch (Standard_Failure& e) {
|
||||
@@ -903,13 +861,6 @@ void TopoShape::exportStep(const char *filename) const
|
||||
const Handle(XSControl_TransferWriter)& hTransferWriter = aWriter.WS()->TransferWriter();
|
||||
Handle(Transfer_FinderProcess) hFinder = hTransferWriter->FinderProcess();
|
||||
|
||||
#if OCC_VERSION_HEX < 0x070500
|
||||
Handle(Message_ProgressIndicator) pi = new ProgressIndicator(100);
|
||||
hFinder->SetProgress(pi);
|
||||
pi->NewScope(100, "Writing STEP file...");
|
||||
pi->Show();
|
||||
#endif
|
||||
|
||||
if (aWriter.Transfer(this->_Shape, STEPControl_AsIs) != IFSelect_RetDone)
|
||||
throw Base::FileException("Error in transferring STEP");
|
||||
|
||||
@@ -923,9 +874,6 @@ void TopoShape::exportStep(const char *filename) const
|
||||
|
||||
if (aWriter.Write(encodeFilename(filename).c_str()) != IFSelect_RetDone)
|
||||
throw Base::FileException("Writing of STEP failed");
|
||||
#if OCC_VERSION_HEX < 0x070500
|
||||
pi->EndScope();
|
||||
#endif
|
||||
}
|
||||
catch (Standard_Failure& e) {
|
||||
throw Base::CADKernelError(e.GetMessageString());
|
||||
@@ -3472,20 +3420,10 @@ void TopoShape::setFaces(const std::vector<Base::Vector3d> &Points,
|
||||
aSewingTool.Init(tolerance, performSewing);
|
||||
aSewingTool.Load(aComp);
|
||||
|
||||
#if OCC_VERSION_HEX < 0x070500
|
||||
Handle(Message_ProgressIndicator) pi = new ProgressIndicator(100);
|
||||
pi->NewScope(100, "Create shape from mesh...");
|
||||
pi->Show();
|
||||
|
||||
aSewingTool.Perform(pi);
|
||||
#else
|
||||
aSewingTool.Perform();
|
||||
#endif
|
||||
|
||||
_Shape = aSewingTool.SewedShape();
|
||||
#if OCC_VERSION_HEX < 0x070500
|
||||
pi->EndScope();
|
||||
#endif
|
||||
|
||||
if (_Shape.IsNull())
|
||||
_Shape = aComp;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user