//
#include <GEOMAlgo_ShellSolid.hxx>
-#include <Basics_OCCTVersion.hxx>
-
#include <Standard_Failure.hxx>
#include <gp_Pnt2d.hxx>
#include <BOPCol_DataMapOfShapeListOfShape.hxx>
#include <BOPCol_ListOfShape.hxx>
-#if OCC_VERSION_LARGE > 0x06070100
#include <IntTools_Context.hxx>
-#else
-#include <BOPInt_Context.hxx>
-#endif
#include <BOPDS_DS.hxx>
#include <BOPAlgo_Builder.hxx>
//=======================================================================
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 > 0x07010001
if (HasErrors()) {
-#else
- if (myErrorStatus) {
-#endif
return;
}
//
// 2. Prepare
Prepare();
-#if OCC_VERSION_LARGE > 0x07010001
if (HasErrors()) {
-#else
- if (myErrorStatus) {
-#endif
return;
}
//
// 3. Fill Images
// 3.1 Vertice
FillImagesVertices();
-#if OCC_VERSION_LARGE > 0x07010001
if (HasErrors()) {
-#else
- if (myErrorStatus) {
-#endif
return;
}
//
BuildResult(TopAbs_VERTEX);
-#if OCC_VERSION_LARGE > 0x07010001
if (HasErrors()) {
-#else
- if (myErrorStatus) {
-#endif
return;
}
// 3.2 Edges
FillImagesEdges();
-#if OCC_VERSION_LARGE > 0x07010001
if (HasErrors()) {
-#else
- if (myErrorStatus) {
-#endif
return;
}
//
BuildResult(TopAbs_EDGE);
-#if OCC_VERSION_LARGE > 0x07010001
if (HasErrors()) {
-#else
- if (myErrorStatus) {
-#endif
return;
}
//
// 3.3 Wires
FillImagesContainers(TopAbs_WIRE);
-#if OCC_VERSION_LARGE > 0x07010001
if (HasErrors()) {
-#else
- if (myErrorStatus) {
-#endif
return;
}
//
BuildResult(TopAbs_WIRE);
-#if OCC_VERSION_LARGE > 0x07010001
if (HasErrors()) {
-#else
- if (myErrorStatus) {
-#endif
return;
}
// 3.4 Faces
FillImagesFaces();
-#if OCC_VERSION_LARGE > 0x07010001
if (HasErrors()) {
-#else
- if (myErrorStatus) {
-#endif
return;
}
//
BuildResult(TopAbs_FACE);
-#if OCC_VERSION_LARGE > 0x07010001
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 > 0x07010001
if(myDSFiller->HasErrors()) {
-#else
- if(myDSFiller->ErrorStatus()) {
-#endif
myErrorStatus=11;
return;
}
return;
}
//
-#if OCC_VERSION_LARGE > 0x06070100
Handle(IntTools_Context) aCtx=myDSFiller->Context();
-#else
- Handle(BOPInt_Context) aCtx=myDSFiller->Context();
-#endif
const BOPDS_IndexRange& aRange=pDS->Range(iRank);
aRange.Indices(iBeg, iEnd);
const TopoDS_Solid& aSolid=(!iRank) ? *((TopoDS_Solid*)&aTool) : *((TopoDS_Solid*)&aObj);
GEOMAlgo_ShellSolidBuilder aSSB;
//
aSSB.PerformWithFiller(*myDSFiller);
-#if OCC_VERSION_LARGE > 0x07010001
iErr=aSSB.HasErrors();
-#else
- iErr=aSSB.ErrorStatus();
-#endif
if (iErr) {
myErrorStatus=15;
return;