aSB.SetContext(myContext);
aSB.SetShapes(aSFS);
aSB.Perform();
+#if OCC_VERSION_LARGE > 0x07010000
+ iErr=aSB.HasErrors();
+#else
iErr=aSB.ErrorStatus();
+#endif
if (iErr) {
myErrorStatus=20; // SolidBuilder failed
return;
//=======================================================================
void GEOMAlgo_ShellSolidBuilder::PerformInternal(const BOPAlgo_PaveFiller& theFiller)
{
+#if OCC_VERSION_LARGE <= 0x07010000
myErrorStatus=0;
+#endif
//
myPaveFiller=(BOPAlgo_PaveFiller*)&theFiller;
myDS=myPaveFiller->PDS();
//
// 1. CheckData
CheckData();
+#if OCC_VERSION_LARGE > 0x07010000
+ if (HasErrors()) {
+#else
if (myErrorStatus) {
+#endif
return;
}
//
// 2. Prepare
Prepare();
+#if OCC_VERSION_LARGE > 0x07010000
+ if (HasErrors()) {
+#else
if (myErrorStatus) {
+#endif
return;
}
//
// 3. Fill Images
// 3.1 Vertice
FillImagesVertices();
+#if OCC_VERSION_LARGE > 0x07010000
+ if (HasErrors()) {
+#else
if (myErrorStatus) {
+#endif
return;
}
//
BuildResult(TopAbs_VERTEX);
+#if OCC_VERSION_LARGE > 0x07010000
+ if (HasErrors()) {
+#else
if (myErrorStatus) {
+#endif
return;
}
// 3.2 Edges
FillImagesEdges();
+#if OCC_VERSION_LARGE > 0x07010000
+ if (HasErrors()) {
+#else
if (myErrorStatus) {
+#endif
return;
}
//
BuildResult(TopAbs_EDGE);
+#if OCC_VERSION_LARGE > 0x07010000
+ if (HasErrors()) {
+#else
if (myErrorStatus) {
+#endif
return;
}
//
// 3.3 Wires
FillImagesContainers(TopAbs_WIRE);
+#if OCC_VERSION_LARGE > 0x07010000
+ if (HasErrors()) {
+#else
if (myErrorStatus) {
+#endif
return;
}
//
BuildResult(TopAbs_WIRE);
+#if OCC_VERSION_LARGE > 0x07010000
+ if (HasErrors()) {
+#else
if (myErrorStatus) {
+#endif
return;
}
// 3.4 Faces
FillImagesFaces();
+#if OCC_VERSION_LARGE > 0x07010000
+ if (HasErrors()) {
+#else
if (myErrorStatus) {
+#endif
return;
}
//
BuildResult(TopAbs_FACE);
+#if OCC_VERSION_LARGE > 0x07010000
+ if (HasErrors()) {
+#else
if (myErrorStatus) {
+#endif
return;
}
}
//=======================================================================
void GEOMAlgo_ShellSolid::Perform()
{
+#if OCC_VERSION_LARGE <= 0x07010000
myErrorStatus=0;
+#endif
//
try {
Standard_Integer aNbArgs, iRank, iErr, iBeg, iEnd, i, aNbSp;
myErrorStatus=10;
return;
}
+#if OCC_VERSION_LARGE > 0x07010000
+ if(myDSFiller->HasErrors()) {
+#else
if(myDSFiller->ErrorStatus()) {
+#endif
myErrorStatus=11;
return;
}
GEOMAlgo_ShellSolidBuilder aSSB;
//
aSSB.PerformWithFiller(*myDSFiller);
+#if OCC_VERSION_LARGE > 0x07010000
+ iErr=aSSB.HasErrors();
+#else
iErr=aSSB.ErrorStatus();
+#endif
if (iErr) {
myErrorStatus=15;
return;
#include <TopTools_ListIteratorOfListOfShape.hxx>
#include <TopTools_IndexedMapOfShape.hxx>
+#include <Basics_OCCTVersion.hxx>
#include <GEOMAlgo_IndexedDataMapOfShapeState.hxx>
myErrorStatus=10;
return;
}
+#if OCC_VERSION_LARGE > 0x07010000
+ if(myDSFiller->HasErrors()) {
+#else
if(myDSFiller->ErrorStatus()) {
+#endif
myErrorStatus=11;
return;
}
#include <BOPTools.hxx>
+#include <Basics_OCCTVersion.hxx>
static
void TreatCompound(const TopoDS_Shape& aC,
//=======================================================================
void GEOMAlgo_Splitter::BuildResult(const TopAbs_ShapeEnum theType)
{
+#if OCC_VERSION_LARGE <= 0x07010000
myErrorStatus=0;
+#endif
//
TopAbs_ShapeEnum aType;
BRep_Builder aBB;
myErrorStatus=10;
return;
}
+#if OCC_VERSION_LARGE > 0x07010000
+ if(myDSFiller->HasErrors()) {
+#else
if(myDSFiller->ErrorStatus()) {
+#endif
myErrorStatus=11;
return;
}
myErrorStatus=10;
return;
}
+#if OCC_VERSION_LARGE > 0x07010000
+ if(myDSFiller->HasErrors()) {
+#else
if(myDSFiller->ErrorStatus()) {
+#endif
myErrorStatus=11;
return;
}
aList2.Append(aShape2);
aCSI.SetArguments(aList1);
aCSI.Perform();
+#if OCC_VERSION_LARGE > 0x07010000
+ if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0)
+#else
if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0)
+#endif
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected");
aCSI.SetArguments(aList2);
aCSI.Perform();
+#if OCC_VERSION_LARGE > 0x07010000
+ if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0)
+#else
if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0)
+#endif
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected");
}
aList1.Append(aShape);
aCSI.SetArguments(aList1);
aCSI.Perform();
+#if OCC_VERSION_LARGE > 0x07010000
+ if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) {
+#else
if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) {
+#endif
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected");
}
}
aList2.Append(aShape2);
aCSI.SetArguments(aList2);
aCSI.Perform();
- if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) {
+#if OCC_VERSION_LARGE > 0x07010000
+ if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) {
+#else
+ if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) {
+#endif
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected");
}
}
aList1.Append(aShape);
aCSI.SetArguments(aList1);
aCSI.Perform();
- if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) {
+#if OCC_VERSION_LARGE > 0x07010000
+ if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) {
+#else
+ if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) {
+#endif
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected");
}
}
aList2.Append(aTool);
aCSI.SetArguments(aList2);
aCSI.Perform();
- if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) {
+#if OCC_VERSION_LARGE > 0x07010000
+ if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) {
+#else
+ if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) {
+#endif
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is self-intersected");
}
}
GEOMAlgo_ShapeInfoFiller aSF;
aSF.SetShape(aShape);
aSF.Perform();
+
Standard_Integer iErr = aSF.ErrorStatus();
+
if (iErr) {
SetErrorCode("Error in GEOMAlgo_ShapeInfoFiller");
return SK_NO_SHAPE;
// 1. Launch the checker
aCSI.Perform();
+#if OCC_VERSION_LARGE > 0x07010000
+ Standard_Boolean iErr = aCSI.HasErrors();
+#else
Standard_Integer iErr = aCSI.ErrorStatus();
+#endif
//
Standard_Integer aNbS, n1, n2;
#include <Standard_NullObject.hxx>
#include <StdFail_NotDone.hxx>
#include <BOPAlgo_CheckerSI.hxx>
+#if OCC_VERSION_LARGE > 0x07010000
+#include <BOPAlgo_Alerts.hxx>
+#endif
#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
#include <BOPCol_ListOfShape.hxx>
#include <BOPDS_DS.hxx>
aCSI.SetLevelOfCheck(BOP_SELF_INTERSECTIONS_LEVEL);
aCSI.SetArguments(aList);
aCSI.Perform();
-
+#if OCC_VERSION_LARGE > 0x07010000
+ if (aCSI.HasErrors() || aCSI.DS().Interferences().Extent() > 0) {
+#else
if (aCSI.ErrorStatus() || aCSI.DS().Interferences().Extent() > 0) {
+#endif
StdFail_NotDone::Raise("Partition operation will not be performed, because argument shape is self-intersected");
}
}
aShape = PS.Shape();
if (aShape.IsNull()) {
// Mantis issue 22009
+#if OCC_VERSION_LARGE > 0x07010000
+ if (PS.HasError(STANDARD_TYPE(BOPAlgo_AlertTooFewArguments)) && PS.Tools().Extent() == 0 && PS.Arguments().Extent() == 1)
+#else
if (PS.ErrorStatus() == 100 && PS.Tools().Extent() == 0 && PS.Arguments().Extent() == 1)
+#endif
aShape = PS.Arguments().First();
else
return 0;
aMV.SetArguments(aLS);
aMV.SetIntersect(aCI.GetIsIntersect());
aMV.Perform();
+#if OCC_VERSION_LARGE > 0x07010000
+ if (aMV.HasErrors()) return 0;
+#else
if (aMV.ErrorStatus()) return 0;
+#endif
aShape = aMV.Shape();
}