mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0024492: The command bopargcheck produces wrong results for cases.
New features: - class BOPDS_InterfVZ has been added. Purpose: The class BOPDS_InterfVZ is is to store the information about the interference of the type vertex/solid. - class BOPDS_InterfEZ has been added. Purpose: The class BOPDS_InterfEZ is is to store the information about the interference of the type edge/solid. - class BOPDS_InterfFZ has been added. Purpose: The class BOPDS_InterfFZ is is to store the information about the interference of the type face/solid. - class BOPDS_InterfFZ has been added. Purpose: The class BOPDS_InterfZZ is is to store the information about the interference of the type solid/solid. - class BOPDS_DS -methods inline BOPDS_VectorOfInterfVZ& BOPDS_DS::InterfVZ() Purpose: Returns the collection of interferences Vertex/Solid inline BOPDS_VectorOfInterfEZ& BOPDS_DS::InterfEZ() Purpose: Returns the collection of interferences Edge/Solid inline BOPDS_VectorOfInterfFZ& BOPDS_DS::InterfFZ() Purpose: Returns the collection of interferences Face/Solid inline BOPDS_VectorOfInterfZZ& BOPDS_DS::InterfZZ() Purpose: Returns the collection of interferences Solid/Solid inline Standard_Integer BOPDS_DS::NbInterfTypes() Purpose: Returns the number of types of the interferences have been added. - class BOPDS_Tools -method inline Standard_Boolean BOPDS_Tools::IsInterfering (const TopAbs_ShapeEnum theT) has been added. Purpose: Returns true if the type <theT> can be participant of an interference - class BOPDS_ShapeInfo -method inline Standard_Boolean BOPDS_ShapeInfo::IsInterfering()const has been added. Purpose: Returns true if the object can be participant of an interference - class BOPDS_ShapeInfo -methods void BOPAlgo_CheckerSI::PerformVZ() Purpose: Computes Vertex/Solid interferences void BOPAlgo_CheckerSI::PerformEZ() Purpose: Computes Edge/Solid interferences void BOPAlgo_CheckerSI::PerformFZ() Purpose: Computes Face/Solid interferences void BOPAlgo_CheckerSI::PerformZZ() Purpose: Computes Solid/Solid interferences have been added Changes: - class BOPDS_DS - method: Standard_Boolean BOPDS_DS::HasInterfShapeSubShapes (const Standard_Integer theI1, const Standard_Integer theI2, const Standard_Boolean theFlag)const has been modified. Purpose: Returns true if the shape with index theI1 is interfered with - at least one sub-shape of the shape with index theI2 (theFlag=true) --all sub-shapes of the shape with index theI2 (theFlag=false) - class BOPDS_Tools - method: inline Standard_Integer BOPDS_Tools::TypeToInteger (const TopAbs_ShapeEnum aType1, const TopAbs_ShapeEnum aType2) The method has been extended to treat */Solid interfertences. - class BOPDS_Iterator - constructors: BOPDS_Iterator::BOPDS_Iterator(); BOPDS_Iterator::BOPDS_Iterator (const Handle(NCollection_BaseAllocator)& theAllocator); - method: void BOPDS_Iterator::Prepare(); The constant number of types of the interferences has been changed by the call: BOPDS_DS::NbInterfTypes(); - class BOPDS_IteratorSI - method: void BOPDS_IteratorSI::UpdateByLevelOfCheck(const Standard_Integer theLevel) The constant number of types of the interferences has been changed by the call: BOPDS_DS::NbInterfTypes(); - method: void BOPDS_IteratorSI::Intersect() The method has been extended to treat */Solid interfertences. - class BOPAlgo_CheckerSI - constructor: BOPAlgo_CheckerSI::BOPAlgo_CheckerSI() The constant number of types of the interferences has been changed by the call: BOPDS_DS::NbInterfTypes(); - method: void BOPAlgo_CheckerSI::SetLevelOfCheck(const Standard_Integer theLevel) The constant number of types of the interferences has been changed by the call: BOPDS_DS::NbInterfTypes(); - methods: void BOPAlgo_CheckerSI::Perform() void BOPAlgo_CheckerSI::PostTreat() The methods have been extended to treat */Solid interfertences. - class BOPAlgo_ArgumentAnalyzer - method: void BOPAlgo_ArgumentAnalyzer::TestSelfInterferences() The method has been extended to treat */Solid interfertences. Added test case bugs/modalg_5/bug24492
This commit is contained in:
@@ -296,21 +296,21 @@ void BOPAlgo_ArgumentAnalyzer::TestTypes()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ================================================================================
|
||||
// function: TestSelfInterferences
|
||||
// purpose:
|
||||
// ================================================================================
|
||||
//=======================================================================
|
||||
//function : TestSelfInterferences
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void BOPAlgo_ArgumentAnalyzer::TestSelfInterferences()
|
||||
{
|
||||
Standard_Integer ii = 0, j;
|
||||
Standard_Integer ii=0, j;
|
||||
Standard_Boolean bSelfInt;
|
||||
|
||||
for(ii = 0; ii < 2; ii++) {
|
||||
const TopoDS_Shape& aS = (ii == 0) ? myShape1 : myShape2;
|
||||
|
||||
if(aS.IsNull())
|
||||
if(aS.IsNull()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Standard_Boolean bIsEmpty = (ii == 0) ? myEmpty1 : myEmpty2;
|
||||
if (bIsEmpty) {
|
||||
@@ -319,6 +319,7 @@ void BOPAlgo_ArgumentAnalyzer::TestSelfInterferences()
|
||||
|
||||
BOPAlgo_CheckerSI aChecker;
|
||||
BOPCol_ListOfShape anArgs;
|
||||
//
|
||||
anArgs.Append(aS);
|
||||
aChecker.SetArguments(anArgs);
|
||||
//
|
||||
@@ -332,20 +333,57 @@ void BOPAlgo_ArgumentAnalyzer::TestSelfInterferences()
|
||||
BOPDS_VectorOfInterfVF& aVFs=theDS->InterfVF();
|
||||
BOPDS_VectorOfInterfEF& aEFs=theDS->InterfEF();
|
||||
BOPDS_VectorOfInterfFF& aFFs=theDS->InterfFF();
|
||||
BOPDS_VectorOfInterfVZ& aVZs=theDS->InterfVZ();
|
||||
BOPDS_VectorOfInterfEZ& aEZs=theDS->InterfEZ();
|
||||
BOPDS_VectorOfInterfFZ& aFZs=theDS->InterfFZ();
|
||||
BOPDS_VectorOfInterfZZ& aZZs=theDS->InterfZZ();
|
||||
//
|
||||
Standard_Integer aNb[6] = {aVVs.Extent(), aVEs.Extent(), aEEs.Extent(),
|
||||
aVFs.Extent(), aEFs.Extent(), aFFs.Extent()};
|
||||
const Standard_Integer aNbTypeInt=10;
|
||||
Standard_Integer aTypeInt, i, nI1, nI2;
|
||||
Standard_Integer aNb[aNbTypeInt] = {
|
||||
aVVs.Extent(), aVEs.Extent(), aEEs.Extent(),
|
||||
aVFs.Extent(), aEFs.Extent(), aFFs.Extent(),
|
||||
aVZs.Extent(), aEZs.Extent(), aFZs.Extent(), aZZs.Extent()};
|
||||
BOPDS_Interf* aInt=NULL;
|
||||
//
|
||||
for (Standard_Integer aTypeInt = 0; aTypeInt < 6; ++aTypeInt) {
|
||||
for (Standard_Integer i = 0; i < aNb[aTypeInt]; ++i) {
|
||||
BOPDS_Interf* aInt = (aTypeInt==0) ? (BOPDS_Interf*)(&aVVs(i)) :
|
||||
((aTypeInt==1) ? (BOPDS_Interf*)(&aVEs(i)) :
|
||||
((aTypeInt==2) ? (BOPDS_Interf*)(&aEEs(i)) :
|
||||
((aTypeInt==3) ? (BOPDS_Interf*)(&aVFs(i)) :
|
||||
((aTypeInt==4) ? (BOPDS_Interf*)(&aEFs(i)) : (BOPDS_Interf*)(&aFFs(i))))));
|
||||
for (aTypeInt = 0; aTypeInt < aNbTypeInt; ++aTypeInt) {
|
||||
for (i = 0; i < aNb[aTypeInt]; ++i) {
|
||||
switch(aTypeInt) {
|
||||
case 0:
|
||||
aInt=(BOPDS_Interf*)(&aVVs(i));
|
||||
break;
|
||||
case 1:
|
||||
aInt=(BOPDS_Interf*)(&aVEs(i));
|
||||
break;
|
||||
case 2:
|
||||
aInt=(BOPDS_Interf*)(&aEEs(i));
|
||||
break;
|
||||
case 3:
|
||||
aInt=(BOPDS_Interf*)(&aVFs(i));
|
||||
break;
|
||||
case 4:
|
||||
aInt=(BOPDS_Interf*)(&aEFs(i));
|
||||
break;
|
||||
case 5:
|
||||
aInt=(BOPDS_Interf*)(&aFFs(i));
|
||||
break;
|
||||
case 6:
|
||||
aInt=(BOPDS_Interf*)(&aVZs(i));
|
||||
break;
|
||||
case 7:
|
||||
aInt=(BOPDS_Interf*)(&aEZs(i));
|
||||
break;
|
||||
case 8:
|
||||
aInt=(BOPDS_Interf*)(&aFZs(i));
|
||||
break;
|
||||
case 9:
|
||||
aInt=(BOPDS_Interf*)(&aZZs(i));
|
||||
break;
|
||||
default:
|
||||
aInt=NULL;
|
||||
}
|
||||
//
|
||||
Standard_Integer nI1 = aInt->Index1();
|
||||
Standard_Integer nI2 = aInt->Index2();
|
||||
aInt->Indices(nI1, nI2);
|
||||
if (nI1 == nI2) {
|
||||
continue;
|
||||
}
|
||||
@@ -398,6 +436,7 @@ void BOPAlgo_ArgumentAnalyzer::TestSelfInterferences()
|
||||
myResult.Append(aResult);
|
||||
}
|
||||
}
|
||||
//
|
||||
if (iErr) {
|
||||
BOPAlgo_CheckResult aResult;
|
||||
if(ii == 0) {
|
||||
@@ -412,9 +451,7 @@ void BOPAlgo_ArgumentAnalyzer::TestSelfInterferences()
|
||||
myResult.Append(aResult);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ================================================================================
|
||||
// function: TestSmallEdge
|
||||
// purpose:
|
||||
@@ -520,7 +557,6 @@ void BOPAlgo_ArgumentAnalyzer::TestSmallEdge()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ================================================================================
|
||||
// function: TestRebuildFace
|
||||
// purpose:
|
||||
|
@@ -48,8 +48,23 @@ is
|
||||
|
||||
PostTreat (me:out)
|
||||
is protected;
|
||||
---Purpose: Provides post-tratment actions
|
||||
|
||||
---Purpose: Provides post-tratment actions
|
||||
|
||||
PerformVZ(me:out)
|
||||
is virtual protected;
|
||||
--Purpose: Computes Vertex/Solid interferences
|
||||
|
||||
PerformEZ(me:out)
|
||||
is virtual protected;
|
||||
--Purpose: Computes Edge/Solid interferences
|
||||
|
||||
PerformFZ(me:out)
|
||||
is virtual protected;
|
||||
--Purpose: Computes Face/Solid interferences
|
||||
PerformZZ(me:out)
|
||||
is virtual protected;
|
||||
--Purpose: Computes Solid/Solid interferences
|
||||
|
||||
|
||||
fields
|
||||
myLevelOfCheck: Integer from Standard is protected;
|
||||
|
@@ -44,9 +44,9 @@
|
||||
//=======================================================================
|
||||
BOPAlgo_CheckerSI::BOPAlgo_CheckerSI()
|
||||
:
|
||||
BOPAlgo_PaveFiller(),
|
||||
myLevelOfCheck(5)
|
||||
BOPAlgo_PaveFiller()
|
||||
{
|
||||
myLevelOfCheck=BOPDS_DS::NbInterfTypes()-1;
|
||||
}
|
||||
//=======================================================================
|
||||
//function : ~
|
||||
@@ -61,7 +61,10 @@ BOPAlgo_CheckerSI::~BOPAlgo_CheckerSI()
|
||||
//=======================================================================
|
||||
void BOPAlgo_CheckerSI::SetLevelOfCheck(const Standard_Integer theLevel)
|
||||
{
|
||||
if (theLevel >= 0 && theLevel <= 5) {
|
||||
Standard_Integer aNbLists;
|
||||
//
|
||||
aNbLists=BOPDS_DS::NbInterfTypes();
|
||||
if (theLevel >= 0 && theLevel < aNbLists) {
|
||||
myLevelOfCheck = theLevel;
|
||||
}
|
||||
}
|
||||
@@ -104,7 +107,7 @@ void BOPAlgo_CheckerSI::Init()
|
||||
//=======================================================================
|
||||
void BOPAlgo_CheckerSI::Perform()
|
||||
{
|
||||
//modified by NIZNHY-PKV Thu Sep 19 08:14:52 2013f
|
||||
|
||||
try {
|
||||
OCC_CATCH_SIGNALS
|
||||
//
|
||||
@@ -113,19 +116,31 @@ void BOPAlgo_CheckerSI::Perform()
|
||||
return;
|
||||
}
|
||||
//
|
||||
PerformVZ();
|
||||
if (myErrorStatus) {
|
||||
return;
|
||||
}
|
||||
//
|
||||
PerformEZ();
|
||||
if (myErrorStatus) {
|
||||
return;
|
||||
}
|
||||
//
|
||||
PerformFZ();
|
||||
if (myErrorStatus) {
|
||||
return;
|
||||
}
|
||||
//
|
||||
PerformZZ();
|
||||
if (myErrorStatus) {
|
||||
return;
|
||||
}
|
||||
//
|
||||
PostTreat();
|
||||
}
|
||||
catch (Standard_Failure) {
|
||||
}
|
||||
/*
|
||||
BOPAlgo_PaveFiller::Perform();
|
||||
if (myErrorStatus) {
|
||||
return;
|
||||
}
|
||||
//
|
||||
PostTreat();
|
||||
*/
|
||||
//modified by NIZNHY-PKV Thu Sep 19 08:14:56 2013t
|
||||
|
||||
}
|
||||
//=======================================================================
|
||||
//function : PostTreat
|
||||
@@ -237,4 +252,49 @@ void BOPAlgo_CheckerSI::PostTreat()
|
||||
aPK.SetIds(n1, n2);
|
||||
aMPK.Add(aPK);
|
||||
}
|
||||
//
|
||||
//
|
||||
// 6
|
||||
BOPDS_VectorOfInterfVZ& aVZs=myDS->InterfVZ();
|
||||
aNb=aVZs.Extent();
|
||||
for (i=0; i!=aNb; ++i) {
|
||||
//
|
||||
const BOPDS_InterfVZ& aVZ=aVZs(i);
|
||||
aVZ.Indices(n1, n2);
|
||||
aPK.SetIds(n1, n2);
|
||||
aMPK.Add(aPK);
|
||||
}
|
||||
//
|
||||
// 7
|
||||
BOPDS_VectorOfInterfEZ& aEZs=myDS->InterfEZ();
|
||||
aNb=aEZs.Extent();
|
||||
for (i=0; i!=aNb; ++i) {
|
||||
//
|
||||
const BOPDS_InterfEZ& aEZ=aEZs(i);
|
||||
aEZ.Indices(n1, n2);
|
||||
aPK.SetIds(n1, n2);
|
||||
aMPK.Add(aPK);
|
||||
}
|
||||
//
|
||||
// 8
|
||||
BOPDS_VectorOfInterfFZ& aFZs=myDS->InterfFZ();
|
||||
aNb=aFZs.Extent();
|
||||
for (i=0; i!=aNb; ++i) {
|
||||
//
|
||||
const BOPDS_InterfFZ& aFZ=aFZs(i);
|
||||
aFZ.Indices(n1, n2);
|
||||
aPK.SetIds(n1, n2);
|
||||
aMPK.Add(aPK);
|
||||
}
|
||||
//
|
||||
// 9
|
||||
BOPDS_VectorOfInterfZZ& aZZs=myDS->InterfZZ();
|
||||
aNb=aZZs.Extent();
|
||||
for (i=0; i!=aNb; ++i) {
|
||||
//
|
||||
const BOPDS_InterfZZ& aZZ=aZZs(i);
|
||||
aZZ.Indices(n1, n2);
|
||||
aPK.SetIds(n1, n2);
|
||||
aMPK.Add(aPK);
|
||||
}
|
||||
}
|
||||
|
227
src/BOPAlgo/BOPAlgo_CheckerSI_1.cxx
Normal file
227
src/BOPAlgo/BOPAlgo_CheckerSI_1.cxx
Normal file
@@ -0,0 +1,227 @@
|
||||
// Created by: Peter KURNEV
|
||||
// Copyright (c) 2010-2012 OPEN CASCADE SAS
|
||||
// Copyright (c) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE
|
||||
// Copyright (c) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT,
|
||||
// EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
|
||||
//
|
||||
// The content of this file is subject to the Open CASCADE Technology Public
|
||||
// License Version 6.5 (the "License"). You may not use the content of this file
|
||||
// except in compliance with the License. Please obtain a copy of the License
|
||||
// at http://www.opencascade.org and read it completely before using this file.
|
||||
//
|
||||
// The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||
// main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||
//
|
||||
// The Original Code and all software distributed under the License is
|
||||
// distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||
// Initial Developer hereby disclaims all such warranties, including without
|
||||
// limitation, any warranties of merchantability, fitness for a particular
|
||||
// purpose or non-infringement. Please see the License for the specific terms
|
||||
// and conditions governing the rights and limitations under the License.
|
||||
//
|
||||
#include <BOPAlgo_CheckerSI.ixx>
|
||||
|
||||
#include <BOPDS_DS.hxx>
|
||||
#include <BOPDS_IteratorSI.hxx>
|
||||
#include <BOPInt_Context.hxx>
|
||||
|
||||
#include <BOPDS_Interf.hxx>
|
||||
#include <TopoDS_Solid.hxx>
|
||||
#include <BRepClass3d_SolidClassifier.hxx>
|
||||
#include <TopoDS_Vertex.hxx>
|
||||
#include <gp_Pnt.hxx>
|
||||
#include <TopAbs_State.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BOPDS_VectorOfInterfVZ.hxx>
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : PerformVZ
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void BOPAlgo_CheckerSI::PerformVZ()
|
||||
{
|
||||
Standard_Boolean bJustAdd;
|
||||
Standard_Integer iSize, nV, nZ, i;
|
||||
Standard_Real aTol;
|
||||
gp_Pnt aPV;
|
||||
TopAbs_State aState;
|
||||
//
|
||||
myErrorStatus=0;
|
||||
//
|
||||
myIterator->Initialize(TopAbs_VERTEX, TopAbs_SOLID);
|
||||
iSize=myIterator->ExpectedLength();
|
||||
if (!iSize) {
|
||||
return;
|
||||
}
|
||||
//
|
||||
BOPDS_VectorOfInterfVZ& aVZs=myDS->InterfVZ();
|
||||
aVZs.SetStartSize(iSize);
|
||||
aVZs.SetIncrement(iSize);
|
||||
aVZs.Init();
|
||||
//
|
||||
for (; myIterator->More(); myIterator->Next()) {
|
||||
myIterator->Value(nV, nZ, bJustAdd);
|
||||
if(bJustAdd) {
|
||||
continue;
|
||||
}
|
||||
//
|
||||
const BOPDS_ShapeInfo& aSIV=myDS->ShapeInfo(nV);
|
||||
const BOPDS_ShapeInfo& aSIZ=myDS->ShapeInfo(nZ);
|
||||
//
|
||||
const TopoDS_Vertex& aV=*((TopoDS_Vertex*)&aSIV.Shape());
|
||||
const TopoDS_Solid& aZ=*((TopoDS_Solid*)&aSIZ.Shape());
|
||||
//
|
||||
BRepClass3d_SolidClassifier& aSC=myContext->SolidClassifier(aZ);
|
||||
//
|
||||
aPV=BRep_Tool::Pnt(aV);
|
||||
aTol=BRep_Tool::Tolerance(aV);
|
||||
//
|
||||
aSC.Perform(aPV, aTol);
|
||||
//
|
||||
aState=aSC.State();
|
||||
if (aState==TopAbs_IN) {
|
||||
i=aVZs.Append()-1;
|
||||
BOPDS_InterfVZ& aVZ=aVZs(i);
|
||||
aVZ.SetIndices(nV, nZ);
|
||||
//
|
||||
myDS->AddInterf(nV, nZ);
|
||||
}
|
||||
}
|
||||
//
|
||||
}
|
||||
//=======================================================================
|
||||
//function : PerformEZ
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void BOPAlgo_CheckerSI::PerformEZ()
|
||||
{
|
||||
Standard_Boolean bJustAdd, bHasInterf;
|
||||
Standard_Integer iSize, nE, nZ, i;
|
||||
//
|
||||
myErrorStatus=0;
|
||||
//
|
||||
myIterator->Initialize(TopAbs_EDGE, TopAbs_SOLID);
|
||||
iSize=myIterator->ExpectedLength();
|
||||
if (!iSize) {
|
||||
return;
|
||||
}
|
||||
//
|
||||
BOPDS_VectorOfInterfEZ& aEZs=myDS->InterfEZ();
|
||||
aEZs.SetStartSize(iSize);
|
||||
aEZs.SetIncrement(iSize);
|
||||
aEZs.Init();
|
||||
//
|
||||
for (; myIterator->More(); myIterator->Next()) {
|
||||
myIterator->Value(nE, nZ, bJustAdd);
|
||||
if(bJustAdd) {
|
||||
continue;
|
||||
}
|
||||
//
|
||||
bHasInterf=myDS->HasInterfShapeSubShapes(nE, nZ);
|
||||
if (bHasInterf) {
|
||||
continue;
|
||||
}
|
||||
//
|
||||
bHasInterf=myDS->HasInterfShapeSubShapes(nZ, nE);
|
||||
if (!bHasInterf) {
|
||||
continue;
|
||||
}
|
||||
//
|
||||
i=aEZs.Append()-1;
|
||||
BOPDS_InterfEZ& aEZ=aEZs(i);
|
||||
aEZ.SetIndices(nE, nZ);
|
||||
//
|
||||
myDS->AddInterf(nE, nZ);
|
||||
}
|
||||
}
|
||||
//=======================================================================
|
||||
//function : PerformFZ
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void BOPAlgo_CheckerSI::PerformFZ()
|
||||
{
|
||||
Standard_Boolean bJustAdd, bHasInterf;
|
||||
Standard_Integer iSize, nF, nZ, i;
|
||||
//
|
||||
myErrorStatus=0;
|
||||
//
|
||||
myIterator->Initialize(TopAbs_FACE, TopAbs_SOLID);
|
||||
iSize=myIterator->ExpectedLength();
|
||||
if (!iSize) {
|
||||
return;
|
||||
}
|
||||
//
|
||||
BOPDS_VectorOfInterfFZ& aFZs=myDS->InterfFZ();
|
||||
aFZs.SetStartSize(iSize);
|
||||
aFZs.SetIncrement(iSize);
|
||||
aFZs.Init();
|
||||
//
|
||||
for (; myIterator->More(); myIterator->Next()) {
|
||||
myIterator->Value(nF, nZ, bJustAdd);
|
||||
if(bJustAdd) {
|
||||
continue;
|
||||
}
|
||||
//
|
||||
bHasInterf=myDS->HasInterfShapeSubShapes(nF, nZ);
|
||||
if (bHasInterf) {
|
||||
continue;
|
||||
}
|
||||
//
|
||||
bHasInterf=myDS->HasInterfShapeSubShapes(nZ, nF);
|
||||
if (!bHasInterf) {
|
||||
continue;
|
||||
}
|
||||
//
|
||||
i=aFZs.Append()-1;
|
||||
BOPDS_InterfFZ& aFZ=aFZs(i);
|
||||
aFZ.SetIndices(nF, nZ);
|
||||
//
|
||||
myDS->AddInterf(nF, nZ);
|
||||
}
|
||||
}
|
||||
//=======================================================================
|
||||
//function : PerformZZ
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
void BOPAlgo_CheckerSI::PerformZZ()
|
||||
{
|
||||
Standard_Boolean bJustAdd, bHasInterf, bFlag;
|
||||
Standard_Integer iSize, nZ1, nZ, i;
|
||||
//
|
||||
myErrorStatus=0;
|
||||
//
|
||||
myIterator->Initialize(TopAbs_SOLID, TopAbs_SOLID);
|
||||
iSize=myIterator->ExpectedLength();
|
||||
if (!iSize) {
|
||||
return;
|
||||
}
|
||||
//
|
||||
BOPDS_VectorOfInterfZZ& aZZs=myDS->InterfZZ();
|
||||
aZZs.SetStartSize(iSize);
|
||||
aZZs.SetIncrement(iSize);
|
||||
aZZs.Init();
|
||||
//
|
||||
bFlag=Standard_False;
|
||||
//
|
||||
for (; myIterator->More(); myIterator->Next()) {
|
||||
myIterator->Value(nZ1, nZ, bJustAdd);
|
||||
if(bJustAdd) {
|
||||
continue;
|
||||
}
|
||||
//
|
||||
bHasInterf=myDS->HasInterfShapeSubShapes(nZ, nZ1, bFlag);
|
||||
if (!bHasInterf) {
|
||||
bHasInterf=myDS->HasInterfShapeSubShapes(nZ1, nZ, bFlag);
|
||||
}
|
||||
if (!bHasInterf) {
|
||||
continue;
|
||||
}
|
||||
//
|
||||
i=aZZs.Append()-1;
|
||||
BOPDS_InterfZZ& aZZ=aZZs(i);
|
||||
aZZ.SetIndices(nZ1, nZ);
|
||||
//
|
||||
myDS->AddInterf(nZ1, nZ);
|
||||
}
|
||||
}
|
@@ -13,5 +13,6 @@ BOPAlgo_Builder_4.cxx
|
||||
BOPAlgo_BOP_1.cxx
|
||||
BOPAlgo_WireSplitter_1.cxx
|
||||
BOPAlgo_ListOfCheckResult.hxx
|
||||
|
||||
BOPAlgo_Builder_2Cnt.hxx
|
||||
|
||||
BOPAlgo_CheckerSI_1.cxx
|
||||
|
Reference in New Issue
Block a user