//
#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>
#include <BRep_Builder.hxx>
#include <BRep_Tool.hxx>
+#include <BRepAdaptor_Surface.hxx>
#include <TopTools_IndexedMapOfOrientedShape.hxx>
#include <TopTools_ListIteratorOfListOfShape.hxx>
#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:
}
//
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) {
//
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);
//
GEOMAlgo_WireSplitter aWS;
//
- //modified by NIZNHY-PKV Thu Jun 10 10:40:43 2010f
if(bToScale) {
TopoDS_Shape aE;
TopTools_ListIteratorOfListOfShape aIt;
myNewWES.AddShape (aW);
}
}//if(bToScale)
- //modified by NIZNHY-PKV Thu Jun 10 10:40:48 2010t
//
else {
aWS.SetFace(aF);
}
}
//
-//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
}
return bRet;
}
-//modified by NIZNHY-PKV Thu Jun 10 11:14:12 2010t
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();