mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-29 10:50:35 +05:00
Mantis issue 0020820: EDF 1350 GEOM : Partition issue. A fix by PKV.
This commit is contained in:
parent
cca1790227
commit
d6508b2300
@ -19,13 +19,10 @@
|
||||
//
|
||||
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
|
||||
//
|
||||
|
||||
// IMPROVED by NIZNHY-PKV Thu Oct 12 16:03:33 2006
|
||||
// File: NMTTools_PaveFiller_6.cxx
|
||||
// Created: Fri Dec 19 10:27:31 2003
|
||||
// Author: Peter KURNEV
|
||||
// <pkv@irinox>
|
||||
//
|
||||
|
||||
#include <NMTTools_PaveFiller.ixx>
|
||||
|
||||
#include <Precision.hxx>
|
||||
@ -101,12 +98,6 @@
|
||||
#include <NMTTools_DataMapIteratorOfDataMapOfIntegerListOfPaveBlock.hxx>
|
||||
#include <NMTTools_MapOfPaveBlock.hxx>
|
||||
|
||||
/*
|
||||
static
|
||||
void SharedEdges1(const TopoDS_Face& aF1,
|
||||
const TopoDS_Face& aF2,
|
||||
TopTools_ListOfShape& aLS);
|
||||
*/
|
||||
static
|
||||
Standard_Boolean IsMicroEdge(const TopoDS_Edge& aE,
|
||||
IntTools_Context& aCtx);
|
||||
@ -127,7 +118,6 @@ static
|
||||
BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger aMapWhat, aMapWith;
|
||||
IntTools_SequenceOfPntOn2Faces aPnts;
|
||||
IntTools_SequenceOfCurves aCvs;
|
||||
//BooleanOperations_KindOfInterference aTypeFF=BooleanOperations_SurfaceSurface;
|
||||
//
|
||||
BOPTools_CArray1OfSSInterference& aFFs=myIP->SSInterferences();
|
||||
//
|
||||
@ -174,10 +164,8 @@ static
|
||||
bIsDone=aFF.IsDone();
|
||||
//
|
||||
if (!bIsDone) {
|
||||
//modified by NIZNHY-PKV Tue Jun 30 09:36:28 2009f
|
||||
BOPTools_SSInterference anInterf (nF1, nF2, 1.e-07, 1.e-07, aCvs, aPnts);
|
||||
anIndexIn=aFFs.Append(anInterf);
|
||||
//modified by NIZNHY-PKV Tue Jun 30 09:36:31 2009t
|
||||
continue;
|
||||
}
|
||||
//
|
||||
@ -210,6 +198,7 @@ static
|
||||
//
|
||||
myIsDone=Standard_True;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function: MakeBlocks
|
||||
// purpose:
|
||||
@ -381,10 +370,10 @@ static
|
||||
// Put Paves On Curves
|
||||
for (j=1; j<=aNbCurves; ++j) {
|
||||
BOPTools_Curve& aBC=aSCvs(j);
|
||||
// DEBUG
|
||||
// DEBUG f
|
||||
const IntTools_Curve& aC=aBC.Curve();
|
||||
Handle(Geom_Curve) aC3D = aC.Curve();
|
||||
//
|
||||
// DEBUG t
|
||||
PutPaveOnCurve (aPSF, aTolR3D, aBC);
|
||||
}
|
||||
//
|
||||
@ -451,8 +440,20 @@ static
|
||||
// Make Section Edge
|
||||
TopoDS_Edge aES;
|
||||
//
|
||||
const TopoDS_Vertex aV1=TopoDS::Vertex(myDS->Shape(nV1));//mpv
|
||||
const TopoDS_Vertex aV2=TopoDS::Vertex(myDS->Shape(nV2));//mpv
|
||||
const TopoDS_Vertex aV1=TopoDS::Vertex(myDS->Shape(nV1));
|
||||
const TopoDS_Vertex aV2=TopoDS::Vertex(myDS->Shape(nV2));
|
||||
//
|
||||
//modified by NIZNHY-PKV Thu Apr 22 07:54:35 2010f
|
||||
{
|
||||
Standard_Real aT;
|
||||
//
|
||||
myContext.IsVertexOnLine(aV1, aIC, aTolR3D, aT);
|
||||
BOPTools_Tools::UpdateVertex (aIC, aT, aV1);
|
||||
//
|
||||
myContext.IsVertexOnLine(aV2, aIC, aTolR3D, aT);
|
||||
BOPTools_Tools::UpdateVertex (aIC, aT, aV2);
|
||||
}
|
||||
//modified by NIZNHY-PKV Thu Apr 22 07:54:37 2010t
|
||||
//
|
||||
BOPTools_Tools::MakeSectEdge (aIC, aV1, aT1, aV2, aT2, aES);
|
||||
//
|
||||
@ -462,7 +463,6 @@ static
|
||||
continue;
|
||||
}
|
||||
//
|
||||
|
||||
{
|
||||
Handle(Geom2d_Curve) aC2D1, aC2D2;
|
||||
//
|
||||
@ -743,6 +743,7 @@ static
|
||||
//
|
||||
myIsDone=Standard_True;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function: MakePCurves
|
||||
// purpose:
|
||||
@ -835,6 +836,7 @@ static
|
||||
}//if (aS.ShapeType()==TopAbs_EDGE) {
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function: IsExistingPaveBlock
|
||||
// purpose:
|
||||
@ -866,6 +868,7 @@ static
|
||||
}
|
||||
return bFlag;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function: IsExistingPaveBlock
|
||||
// purpose:
|
||||
@ -901,6 +904,7 @@ static
|
||||
}
|
||||
return bFlag;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function: CheckIntermediatePoint
|
||||
// purpose:
|
||||
@ -908,7 +912,6 @@ static
|
||||
Standard_Integer NMTTools_PaveFiller::CheckIntermediatePoint(const BOPTools_PaveBlock& aPB,
|
||||
const BOPTools_PaveBlock& aPBR,
|
||||
const Standard_Real aTolC)
|
||||
|
||||
{
|
||||
Standard_Integer iVM, nE2;
|
||||
//
|
||||
@ -918,6 +921,7 @@ static
|
||||
//
|
||||
return iVM;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function: CheckIntermediatePoint
|
||||
// purpose:
|
||||
@ -950,6 +954,7 @@ static
|
||||
//
|
||||
return iVM;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function: PutBoundPaveOnCurve
|
||||
// purpose:
|
||||
@ -988,6 +993,7 @@ static
|
||||
PutBoundPaveOnCurve (aP2, aT2, aBC, aFFi);
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function: PutBoundPaveOnCurve
|
||||
// purpose:
|
||||
@ -1046,6 +1052,7 @@ static
|
||||
BOPTools_Tools::UpdateVertex (aIC, aT, aV);
|
||||
}
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function: FindPave
|
||||
// purpose:
|
||||
@ -1072,6 +1079,7 @@ static
|
||||
}
|
||||
return bIsVertex;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function: PrepareSetForFace
|
||||
// purpose:
|
||||
@ -1102,87 +1110,6 @@ static
|
||||
}
|
||||
}
|
||||
}
|
||||
//=======================================================================
|
||||
// function: PutPaveOnCurve
|
||||
// purpose:
|
||||
//=======================================================================
|
||||
void NMTTools_PaveFiller::PutPaveOnCurve(const BOPTools_PaveSet& aPaveSet,
|
||||
const Standard_Real aTolR3D,
|
||||
BOPTools_Curve& aBC)
|
||||
{
|
||||
Standard_Integer nV;
|
||||
Standard_Boolean bIsVertexOnLine;
|
||||
Standard_Real aT;
|
||||
BOPTools_ListIteratorOfListOfPave anIt;
|
||||
Bnd_Box aBBC;
|
||||
GeomAdaptor_Curve aGAC;
|
||||
//
|
||||
const IntTools_Curve& aC=aBC.Curve();
|
||||
Handle (Geom_Curve) aC3D= aC.Curve();
|
||||
aGAC.Load(aC3D);
|
||||
BndLib_Add3dCurve::Add(aGAC, aTolR3D, aBBC);
|
||||
//
|
||||
const BOPTools_ListOfPave& aLP=aPaveSet.Set();
|
||||
anIt.Initialize(aLP);
|
||||
for (; anIt.More(); anIt.Next()) {
|
||||
const BOPTools_Pave& aPave=anIt.Value();
|
||||
//
|
||||
nV=aPave.Index();
|
||||
const TopoDS_Vertex aV=TopoDS::Vertex(myDS->Shape(nV));//mpv
|
||||
//
|
||||
Bnd_Box aBBV;
|
||||
BRepBndLib::Add(aV, aBBV);
|
||||
if (aBBC.IsOut(aBBV)){
|
||||
continue;
|
||||
}
|
||||
//
|
||||
bIsVertexOnLine=myContext.IsVertexOnLine(aV, aC, aTolR3D, aT);
|
||||
//
|
||||
if (bIsVertexOnLine) {
|
||||
BOPTools_Pave aPaveNew(nV, aT, BooleanOperations_SurfaceSurface);
|
||||
BOPTools_PaveSet& aPS=aBC.Set();
|
||||
aPS.Append(aPaveNew);
|
||||
//<-B
|
||||
BOPTools_Tools::UpdateVertex (aC, aT, aV);
|
||||
}
|
||||
}
|
||||
}
|
||||
/////////////
|
||||
|
||||
|
||||
//=======================================================================
|
||||
//function : SharedEdges1
|
||||
//purpose :
|
||||
//=======================================================================
|
||||
/*
|
||||
void SharedEdges1(const TopoDS_Face& aF1,
|
||||
const TopoDS_Face& aF2,
|
||||
TopTools_ListOfShape& aLS)
|
||||
{
|
||||
Standard_Integer i, aNbE, aNbF;;
|
||||
TopTools_IndexedDataMapOfShapeListOfShape aMEF;
|
||||
//
|
||||
TopExp::MapShapesAndAncestors(aF1, TopAbs_EDGE, TopAbs_FACE, aMEF);
|
||||
TopExp::MapShapesAndAncestors(aF2, TopAbs_EDGE, TopAbs_FACE, aMEF);
|
||||
//
|
||||
aNbE=aMEF.Extent();
|
||||
for (i=1; i<=aNbE; ++i) {
|
||||
const TopTools_ListOfShape& aLF=aMEF.FindFromIndex(i);
|
||||
aNbF=aLF.Extent();
|
||||
if (aNbF>1) {
|
||||
if (aNbF==2) {
|
||||
const TopoDS_Shape& aF1x=aLF.First();
|
||||
const TopoDS_Shape& aF2x=aLF.Last();
|
||||
if (aF1x.IsSame(aF2x)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
const TopoDS_Shape& aE=aMEF.FindKey(i);
|
||||
aLS.Append (aE);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
//=======================================================================
|
||||
// function: CheckCoincidence
|
||||
@ -1190,7 +1117,6 @@ void SharedEdges1(const TopoDS_Face& aF1,
|
||||
//=======================================================================
|
||||
Standard_Boolean NMTTools_PaveFiller::CheckCoincidence(const BOPTools_PaveBlock& aPBNew,
|
||||
const BOPTools_ListOfPaveBlock& aLPBFF)
|
||||
|
||||
{
|
||||
Standard_Boolean bRet;
|
||||
Standard_Real aTE;
|
||||
@ -1334,3 +1260,51 @@ Standard_Boolean IsMicroEdge(const TopoDS_Edge& aE,
|
||||
//
|
||||
return bRet;
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
// function: PutPaveOnCurve
|
||||
// purpose:
|
||||
//=======================================================================
|
||||
void NMTTools_PaveFiller::PutPaveOnCurve(const BOPTools_PaveSet& aPaveSet,
|
||||
const Standard_Real aTolR3D,
|
||||
BOPTools_Curve& aBC)
|
||||
{
|
||||
Standard_Integer nV;
|
||||
Standard_Boolean bIsVertexOnLine;
|
||||
Standard_Real aT;
|
||||
BOPTools_ListIteratorOfListOfPave anIt;
|
||||
Bnd_Box aBBC;
|
||||
GeomAdaptor_Curve aGAC;
|
||||
//
|
||||
const IntTools_Curve& aC=aBC.Curve();
|
||||
Handle (Geom_Curve) aC3D= aC.Curve();
|
||||
aGAC.Load(aC3D);
|
||||
BndLib_Add3dCurve::Add(aGAC, aTolR3D, aBBC);
|
||||
//
|
||||
const BOPTools_ListOfPave& aLP=aPaveSet.Set();
|
||||
anIt.Initialize(aLP);
|
||||
for (; anIt.More(); anIt.Next()) {
|
||||
const BOPTools_Pave& aPave=anIt.Value();
|
||||
//
|
||||
nV=aPave.Index();
|
||||
const TopoDS_Vertex aV=TopoDS::Vertex(myDS->Shape(nV));//mpv
|
||||
//
|
||||
Bnd_Box aBBV;
|
||||
BRepBndLib::Add(aV, aBBV);
|
||||
if (aBBC.IsOut(aBBV)){
|
||||
continue;
|
||||
}
|
||||
//
|
||||
bIsVertexOnLine=myContext.IsVertexOnLine(aV, aC, aTolR3D, aT);
|
||||
//
|
||||
if (bIsVertexOnLine) {
|
||||
BOPTools_Pave aPaveNew(nV, aT, BooleanOperations_SurfaceSurface);
|
||||
BOPTools_PaveSet& aPS=aBC.Set();
|
||||
aPS.Append(aPaveNew);
|
||||
//<-B
|
||||
//modified by NIZNHY-PKV Thu Apr 22 10:36:45 2010f
|
||||
//BOPTools_Tools::UpdateVertex (aC, aT, aV);
|
||||
//modified by NIZNHY-PKV Thu Apr 22 10:36:48 2010t
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user