mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-29 10:50:35 +05:00
PKV fix to IPAL22072 TC 5.1.5: Partition failed
This commit is contained in:
parent
765bd64dfa
commit
ff594551b8
@ -26,7 +26,11 @@
|
||||
//
|
||||
#include <GEOMAlgo_WESCorrector.ixx>
|
||||
|
||||
#include <Geom_Surface.hxx>
|
||||
|
||||
#include <TopLoc_Location.hxx>
|
||||
#include <TopoDS.hxx>
|
||||
|
||||
#include <TopoDS_Shape.hxx>
|
||||
#include <TopoDS_Wire.hxx>
|
||||
#include <TopoDS_Face.hxx>
|
||||
@ -34,6 +38,7 @@
|
||||
|
||||
#include <BRep_Builder.hxx>
|
||||
#include <BRep_Tool.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
|
||||
#include <TopTools_IndexedMapOfOrientedShape.hxx>
|
||||
#include <TopTools_ListIteratorOfListOfShape.hxx>
|
||||
@ -54,16 +59,15 @@
|
||||
#include <GEOMAlgo_WireSplitter.hxx>
|
||||
#include <GEOMAlgo_WESScaler.hxx>
|
||||
|
||||
|
||||
static
|
||||
void MakeWire(const TopTools_ListOfShape& aLE,
|
||||
TopoDS_Wire& newWire);
|
||||
|
||||
//modified by NIZNHY-PKV Thu Jun 10 11:26:55 2010f
|
||||
|
||||
static
|
||||
Standard_Boolean IsToScale(const TopoDS_Face& aF,
|
||||
Standard_Real& aScale);
|
||||
//modified by NIZNHY-PKV Thu Jun 10 11:27:02 2010t
|
||||
|
||||
//=======================================================================
|
||||
// function:
|
||||
// purpose:
|
||||
@ -227,7 +231,14 @@ static
|
||||
}
|
||||
//
|
||||
if (bRegular) {
|
||||
TopExp::MapShapesAndAncestors(aER, TopAbs_VERTEX, TopAbs_EDGE, aMVER);
|
||||
//modified by NIZNHY-PKV Wed Oct 20 14:45:52 2010f
|
||||
const TopoDS_Edge& aEx=*((TopoDS_Edge*)&aER);
|
||||
if (!BRep_Tool::Degenerated(aEx)) {
|
||||
TopExp::MapShapesAndAncestors(aER, TopAbs_VERTEX, TopAbs_EDGE, aMVER);
|
||||
}
|
||||
//
|
||||
//TopExp::MapShapesAndAncestors(aER, TopAbs_VERTEX, TopAbs_EDGE, aMVER);
|
||||
//modified by NIZNHY-PKV Wed Oct 20 14:46:48 2010t
|
||||
}
|
||||
}//for (j=1; j<=aNbC; ++j) {
|
||||
//
|
||||
@ -274,9 +285,8 @@ static
|
||||
GEOMAlgo_WESScaler aWSC;
|
||||
//
|
||||
const TopoDS_Face& aF=myWES->Face();
|
||||
//modified by NIZNHY-PKV Thu Jun 10 11:27:45 2010f
|
||||
//
|
||||
bToScale=IsToScale(aF, aScale);
|
||||
//modified by NIZNHY-PKV Thu Jun 10 11:27:49 2010t
|
||||
//
|
||||
myNewWES.SetFace(aF);
|
||||
aCBIt.Initialize(myConnexityBlocks);
|
||||
@ -293,7 +303,6 @@ static
|
||||
//
|
||||
GEOMAlgo_WireSplitter aWS;
|
||||
//
|
||||
//modified by NIZNHY-PKV Thu Jun 10 10:40:43 2010f
|
||||
if(bToScale) {
|
||||
TopoDS_Shape aE;
|
||||
TopTools_ListIteratorOfListOfShape aIt;
|
||||
@ -345,7 +354,6 @@ static
|
||||
myNewWES.AddShape (aW);
|
||||
}
|
||||
}//if(bToScale)
|
||||
//modified by NIZNHY-PKV Thu Jun 10 10:40:48 2010t
|
||||
//
|
||||
else {
|
||||
aWS.SetFace(aF);
|
||||
@ -392,11 +400,7 @@ static
|
||||
}
|
||||
}
|
||||
//
|
||||
//modified by NIZNHY-PKV Thu Jun 10 11:14:09 2010f
|
||||
|
||||
#include <Geom_Surface.hxx>
|
||||
#include <TopLoc_Location.hxx>
|
||||
#include <BRepAdaptor_Surface.hxx>
|
||||
|
||||
//=======================================================================
|
||||
//function : IsToScale
|
||||
@ -427,5 +431,4 @@ Standard_Boolean IsToScale(const TopoDS_Face& aF,
|
||||
}
|
||||
return bRet;
|
||||
}
|
||||
//modified by NIZNHY-PKV Thu Jun 10 11:14:12 2010t
|
||||
|
||||
|
@ -454,16 +454,54 @@
|
||||
const BOPTools_SplitShapesPool& aSplitShapesPool=myFiller->SplitShapesPool();
|
||||
const BOPTools_ListOfPaveBlock& aSplitEdges=aSplitShapesPool(myDS->RefEdge(nED));
|
||||
|
||||
Standard_Integer nV1, nV2, aNewShapeIndex;
|
||||
Standard_Real t1, t2;
|
||||
Standard_Integer nV1, nV2, aNbPB, aNewShapeIndex;
|
||||
Standard_Real t1, t2;
|
||||
TopoDS_Edge aE, aESplit;
|
||||
TopoDS_Vertex aV1, aV2;
|
||||
|
||||
BOPTools_ListIteratorOfListOfPaveBlock aPBIt;
|
||||
//
|
||||
const TopoDS_Edge aDE=TopoDS::Edge(myDS->Shape(nED));
|
||||
const TopoDS_Face aDF=TopoDS::Face(myDS->Shape(nFD));
|
||||
|
||||
BOPTools_ListIteratorOfListOfPaveBlock aPBIt(aSplitEdges);
|
||||
|
||||
//
|
||||
//modified by NIZNHY-PKV Wed Oct 20 13:20:37 2010f
|
||||
aNbPB=aSplitEdges.Extent();
|
||||
if (aNbPB==1) {
|
||||
Standard_Real aT1, aT2, dT1, dT2, aDT;
|
||||
Handle(Geom2d_Curve) aC2D;
|
||||
//
|
||||
BOPTools_PaveBlock& aPB=aSplitEdges.First();
|
||||
//
|
||||
const BOPTools_Pave& aPave1=aPB.Pave1();
|
||||
t1=aPave1.Param();
|
||||
const BOPTools_Pave& aPave2=aPB.Pave2();
|
||||
t2=aPave2.Param();
|
||||
////
|
||||
nV1=aPave1.Index();
|
||||
aV1=*((TopoDS_Vertex*)&myDS->GetShape(nV1));
|
||||
//
|
||||
aV2=TopExp::FirstVertex(aDE);
|
||||
if (aV2.IsSame(aV1)) {
|
||||
aC2D=BRep_Tool::CurveOnSurface(aDE, aDF, aT1, aT2);
|
||||
dT1=aT1-t1;
|
||||
if (dT1<0.) {
|
||||
dT1=-dT1;
|
||||
}
|
||||
//
|
||||
dT2=aT2-t2;
|
||||
if (dT2<0.) {
|
||||
dT2=-dT2;
|
||||
}
|
||||
aDT=Precision::PConfusion();
|
||||
if(dT1<aDT && dT2<aDT) {
|
||||
BOPTools_ListOfPaveBlock* pLPB=(BOPTools_ListOfPaveBlock*)&aSplitEdges;
|
||||
pLPB->Clear();
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
//modified by NIZNHY-PKV Wed Oct 20 13:20:39 2010t
|
||||
//
|
||||
aPBIt.Initialize(aSplitEdges);
|
||||
for (; aPBIt.More(); aPBIt.Next()) {
|
||||
BOPTools_PaveBlock& aPB=aPBIt.Value();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user