mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2025-01-15 05:20:33 +05:00
0023451: EDF - Remove Extra edges. Improvement by JGV in BlockFix_UnionFaces.cxx. And porting to OCCT dev (7.2.1).
This commit is contained in:
parent
dbb1bb16ca
commit
0ba64ea099
@ -82,6 +82,10 @@
|
|||||||
#include <Geom_SurfaceOfRevolution.hxx>
|
#include <Geom_SurfaceOfRevolution.hxx>
|
||||||
#include <Geom_SurfaceOfLinearExtrusion.hxx>
|
#include <Geom_SurfaceOfLinearExtrusion.hxx>
|
||||||
#include <Geom_RectangularTrimmedSurface.hxx>
|
#include <Geom_RectangularTrimmedSurface.hxx>
|
||||||
|
#include <BRepAdaptor_Surface.hxx>
|
||||||
|
#include <BRepAdaptor_HSurface.hxx>
|
||||||
|
#include <LocalAnalysis_SurfaceContinuity.hxx>
|
||||||
|
#include <GeomConvert_ApproxSurface.hxx>
|
||||||
|
|
||||||
#include <Geom_Curve.hxx>
|
#include <Geom_Curve.hxx>
|
||||||
#include <Geom_Line.hxx>
|
#include <Geom_Line.hxx>
|
||||||
@ -233,17 +237,88 @@ static Standard_Boolean IsFacesOfSameSolids
|
|||||||
return isSame;
|
return isSame;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : IsTangentFaces
|
||||||
|
//purpose : decides: is edge on closed surface tangent or not
|
||||||
|
//=======================================================================
|
||||||
|
static Standard_Boolean IsTangentFaces(const TopoDS_Edge& theEdge,
|
||||||
|
const TopoDS_Face& theFace)
|
||||||
|
{
|
||||||
|
Standard_Real TolC0 = Max(0.001, 1.5*BRep_Tool::Tolerance(theEdge));
|
||||||
|
|
||||||
|
Standard_Real aFirst;
|
||||||
|
Standard_Real aLast;
|
||||||
|
|
||||||
|
// Obtaining of pcurves of edge on two faces.
|
||||||
|
const Handle(Geom2d_Curve) aC2d1 = BRep_Tool::CurveOnSurface
|
||||||
|
(theEdge, theFace, aFirst, aLast);
|
||||||
|
TopoDS_Edge ReversedEdge = theEdge;
|
||||||
|
ReversedEdge.Reverse();
|
||||||
|
const Handle(Geom2d_Curve) aC2d2 = BRep_Tool::CurveOnSurface
|
||||||
|
(ReversedEdge, theFace, aFirst, aLast);
|
||||||
|
if (aC2d1.IsNull() || aC2d2.IsNull())
|
||||||
|
return Standard_False;
|
||||||
|
|
||||||
|
// Obtaining of two surfaces from adjacent faces.
|
||||||
|
Handle(Geom_Surface) aSurf = BRep_Tool::Surface(theFace);
|
||||||
|
|
||||||
|
if (aSurf.IsNull())
|
||||||
|
return Standard_False;
|
||||||
|
|
||||||
|
// Computation of the number of samples on the edge.
|
||||||
|
BRepAdaptor_Surface aBAS(theFace);
|
||||||
|
Handle(BRepAdaptor_HSurface) aBAHS = new BRepAdaptor_HSurface(aBAS);
|
||||||
|
Handle(BRepTopAdaptor_TopolTool) aTool = new BRepTopAdaptor_TopolTool(aBAHS);
|
||||||
|
Standard_Integer aNbSamples = aTool->NbSamples();
|
||||||
|
const Standard_Integer aNbSamplesMax = 23;
|
||||||
|
aNbSamples = Min(aNbSamplesMax, aNbSamples);
|
||||||
|
const Standard_Real aTolAngle = M_PI/18;
|
||||||
|
|
||||||
|
|
||||||
|
// Computation of the continuity.
|
||||||
|
Standard_Real aPar;
|
||||||
|
Standard_Real aDelta = (aLast - aFirst)/(aNbSamples - 1);
|
||||||
|
Standard_Integer i, nbNotDone = 0;
|
||||||
|
|
||||||
|
for (i = 1, aPar = aFirst; i <= aNbSamples; i++, aPar += aDelta) {
|
||||||
|
if (i == aNbSamples) aPar = aLast;
|
||||||
|
|
||||||
|
LocalAnalysis_SurfaceContinuity aCont(aC2d1, aC2d2, aPar,
|
||||||
|
aSurf, aSurf, GeomAbs_G1,
|
||||||
|
0.001, TolC0, aTolAngle, 0.1, 0.1);
|
||||||
|
if (!aCont.IsDone())
|
||||||
|
{
|
||||||
|
nbNotDone++;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!aCont.IsG1())
|
||||||
|
return Standard_False;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (nbNotDone == aNbSamples)
|
||||||
|
return Standard_False;
|
||||||
|
|
||||||
|
return Standard_True;
|
||||||
|
}
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : IsEdgeValidToMerge
|
//function : IsEdgeValidToMerge
|
||||||
//purpose : Edge is valid if it is not seam or if it is a seam and the face
|
//purpose : Edge is valid if it is not seam or if it is a seam and the face
|
||||||
// has another seam edge.
|
// has another seam edge.
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
static Standard_Boolean IsEdgeValidToMerge(const TopoDS_Edge& theEdge,
|
static Standard_Boolean IsEdgeValidToMerge(const TopoDS_Edge& theEdge,
|
||||||
const TopoDS_Face &theFace)
|
const TopoDS_Face& theFace,
|
||||||
|
const Handle(Geom_Surface)& theSurface,
|
||||||
|
Standard_Boolean& theToMakeUPeriodic,
|
||||||
|
Standard_Boolean& theToMakeVPeriodic)
|
||||||
{
|
{
|
||||||
Standard_Boolean isValid = Standard_True;
|
Standard_Boolean isValid = Standard_True;
|
||||||
|
|
||||||
if (BRep_Tool::IsClosed(theEdge, theFace)) {
|
if (BRepTools::IsReallyClosed(theEdge, theFace)) {
|
||||||
|
// Mantis issue 0023451, now code corresponds to the comment to this method
|
||||||
|
isValid = Standard_False;
|
||||||
|
|
||||||
// This is a seam edge. Check if there are another seam edges on the face.
|
// This is a seam edge. Check if there are another seam edges on the face.
|
||||||
TopExp_Explorer anExp(theFace, TopAbs_EDGE);
|
TopExp_Explorer anExp(theFace, TopAbs_EDGE);
|
||||||
|
|
||||||
@ -259,11 +334,38 @@ static Standard_Boolean IsEdgeValidToMerge(const TopoDS_Edge &theEdge,
|
|||||||
TopoDS_Edge anEdge = TopoDS::Edge(aShEdge);
|
TopoDS_Edge anEdge = TopoDS::Edge(aShEdge);
|
||||||
|
|
||||||
if (BRep_Tool::IsClosed(anEdge, theFace)) {
|
if (BRep_Tool::IsClosed(anEdge, theFace)) {
|
||||||
isValid = Standard_False;
|
// Mantis issue 0023451, now code corresponds to the comment to this method
|
||||||
|
//isValid = Standard_False;
|
||||||
|
isValid = Standard_True;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if (BRep_Tool::IsClosed(theEdge, theFace))
|
||||||
|
{
|
||||||
|
Standard_Real fpar, lpar;
|
||||||
|
Handle(Geom2d_Curve) aPCurve = BRep_Tool::CurveOnSurface(theEdge, theFace, fpar, lpar);
|
||||||
|
gp_Pnt2d P2d1 = aPCurve->Value(fpar);
|
||||||
|
gp_Pnt2d P2d2 = aPCurve->Value(lpar);
|
||||||
|
if (!theSurface->IsUPeriodic() &&
|
||||||
|
theSurface->IsUClosed() &&
|
||||||
|
Abs(P2d1.X() - P2d2.X()) < Abs(P2d1.Y() - P2d2.Y()))
|
||||||
|
{
|
||||||
|
if (IsTangentFaces(theEdge, theFace))
|
||||||
|
theToMakeUPeriodic = Standard_True;
|
||||||
|
else
|
||||||
|
isValid = Standard_False;
|
||||||
|
}
|
||||||
|
if (!theSurface->IsVPeriodic() &&
|
||||||
|
theSurface->IsVClosed() &&
|
||||||
|
Abs(P2d1.Y() - P2d2.Y()) < Abs(P2d1.X() - P2d2.X()))
|
||||||
|
{
|
||||||
|
if (IsTangentFaces(theEdge, theFace))
|
||||||
|
theToMakeVPeriodic = Standard_True;
|
||||||
|
else
|
||||||
|
isValid = Standard_False;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return isValid;
|
return isValid;
|
||||||
}
|
}
|
||||||
@ -334,12 +436,14 @@ TopoDS_Shape BlockFix_UnionFaces::Perform(const TopoDS_Shape& Shape)
|
|||||||
Handle(Geom_Surface) aBaseSurface = BRep_Tool::Surface(aFace,aBaseLocation);
|
Handle(Geom_Surface) aBaseSurface = BRep_Tool::Surface(aFace,aBaseLocation);
|
||||||
aBaseSurface = ClearRts(aBaseSurface);
|
aBaseSurface = ClearRts(aBaseSurface);
|
||||||
aBaseSurface = Handle(Geom_Surface)::DownCast(aBaseSurface->Copy());
|
aBaseSurface = Handle(Geom_Surface)::DownCast(aBaseSurface->Copy());
|
||||||
|
Standard_Boolean ToMakeUPeriodic = Standard_False, ToMakeVPeriodic = Standard_False;
|
||||||
|
|
||||||
// find adjacent faces to union
|
// find adjacent faces to union
|
||||||
Standard_Integer i;
|
Standard_Integer i;
|
||||||
for (i = 1; i <= edges.Length(); i++) {
|
for (i = 1; i <= edges.Length(); i++) {
|
||||||
TopoDS_Edge edge = TopoDS::Edge(edges(i));
|
TopoDS_Edge edge = TopoDS::Edge(edges(i));
|
||||||
if (BRep_Tool::Degenerated(edge) || !IsEdgeValidToMerge(edge, aFace))
|
if (BRep_Tool::Degenerated(edge) ||
|
||||||
|
!IsEdgeValidToMerge(edge, aFace, aBaseSurface, ToMakeUPeriodic, ToMakeVPeriodic))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
const TopTools_ListOfShape& aList = aMapEdgeFaces.FindFromKey(edge);
|
const TopTools_ListOfShape& aList = aMapEdgeFaces.FindFromKey(edge);
|
||||||
@ -352,7 +456,8 @@ TopoDS_Shape BlockFix_UnionFaces::Perform(const TopoDS_Shape& Shape)
|
|||||||
if (aProcessed.Contains(anCheckedFace))
|
if (aProcessed.Contains(anCheckedFace))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (!IsEdgeValidToMerge(edge, anCheckedFace)) {
|
if (!IsEdgeValidToMerge(edge, anCheckedFace,
|
||||||
|
aBaseSurface, ToMakeUPeriodic, ToMakeVPeriodic)) {
|
||||||
// Skip seam edge.
|
// Skip seam edge.
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -392,6 +497,27 @@ TopoDS_Shape BlockFix_UnionFaces::Perform(const TopoDS_Shape& Shape)
|
|||||||
NbModif++;
|
NbModif++;
|
||||||
TopoDS_Face aResult;
|
TopoDS_Face aResult;
|
||||||
BRep_Builder B;
|
BRep_Builder B;
|
||||||
|
if (ToMakeUPeriodic || ToMakeVPeriodic)
|
||||||
|
{
|
||||||
|
Handle(Geom_BSplineSurface) aBSplineSurface = Handle(Geom_BSplineSurface)::DownCast(aBaseSurface);
|
||||||
|
if (aBSplineSurface.IsNull())
|
||||||
|
{
|
||||||
|
Standard_Real aTol = 1.e-4;
|
||||||
|
GeomAbs_Shape aUCont = GeomAbs_C1, aVCont = GeomAbs_C1;
|
||||||
|
Standard_Integer degU = 14, degV = 14;
|
||||||
|
Standard_Integer nmax = 16;
|
||||||
|
Standard_Integer aPrec = 1;
|
||||||
|
GeomConvert_ApproxSurface Approximator(aBaseSurface,aTol,aUCont,aVCont,degU,degV,nmax,aPrec);
|
||||||
|
aBSplineSurface = Approximator.Surface();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ToMakeUPeriodic)
|
||||||
|
aBSplineSurface->SetUPeriodic();
|
||||||
|
if (ToMakeVPeriodic)
|
||||||
|
aBSplineSurface->SetVPeriodic();
|
||||||
|
|
||||||
|
aBaseSurface = aBSplineSurface;
|
||||||
|
}
|
||||||
B.MakeFace(aResult,aBaseSurface,aBaseLocation,0);
|
B.MakeFace(aResult,aBaseSurface,aBaseLocation,0);
|
||||||
Standard_Integer nbWires = 0;
|
Standard_Integer nbWires = 0;
|
||||||
|
|
||||||
@ -516,6 +642,9 @@ TopoDS_Shape BlockFix_UnionFaces::Perform(const TopoDS_Shape& Shape)
|
|||||||
sff.SetMaxTolerance(Max(1.,myTolerance*1000.));
|
sff.SetMaxTolerance(Max(1.,myTolerance*1000.));
|
||||||
//Setting modes
|
//Setting modes
|
||||||
sff.FixOrientationMode() = 0;
|
sff.FixOrientationMode() = 0;
|
||||||
|
#if OCC_VERSION_LARGE > 0x07020001
|
||||||
|
sff.FixWireTool()->CheckMissingEdgesMode() = Standard_False;
|
||||||
|
#endif
|
||||||
//sff.FixWireMode() = 0;
|
//sff.FixWireMode() = 0;
|
||||||
sff.SetContext(aContext);
|
sff.SetContext(aContext);
|
||||||
// Applying the fixes
|
// Applying the fixes
|
||||||
|
@ -27,6 +27,8 @@
|
|||||||
//
|
//
|
||||||
#include <GEOMAlgo_Gluer.hxx>
|
#include <GEOMAlgo_Gluer.hxx>
|
||||||
|
|
||||||
|
#include <Basics_OCCTVersion.hxx>
|
||||||
|
|
||||||
#include <NCollection_UBTreeFiller.hxx>
|
#include <NCollection_UBTreeFiller.hxx>
|
||||||
|
|
||||||
#include <TColStd_MapIteratorOfMapOfInteger.hxx>
|
#include <TColStd_MapIteratorOfMapOfInteger.hxx>
|
||||||
@ -508,7 +510,12 @@ void GEOMAlgo_Gluer::MakeSolids()
|
|||||||
myResult=aCmp;
|
myResult=aCmp;
|
||||||
//
|
//
|
||||||
if (aMS.Extent()) {
|
if (aMS.Extent()) {
|
||||||
|
#if OCC_VERSION_LARGE > 0x07020001
|
||||||
|
TopTools_IndexedMapOfShape aMapToAvoid;
|
||||||
|
BOPTools_AlgoTools::CorrectCurveOnSurface(myResult, aMapToAvoid, 0.0001);
|
||||||
|
#else
|
||||||
BOPTools_AlgoTools::CorrectCurveOnSurface(myResult, 0.0001);
|
BOPTools_AlgoTools::CorrectCurveOnSurface(myResult, 0.0001);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
|
@ -39,9 +39,8 @@
|
|||||||
|
|
||||||
#include <BOPAlgo_BuilderSolid.hxx>
|
#include <BOPAlgo_BuilderSolid.hxx>
|
||||||
|
|
||||||
#include <BOPTools.hxx>
|
|
||||||
#include <BOPTools_AlgoTools.hxx>
|
#include <BOPTools_AlgoTools.hxx>
|
||||||
#include <BOPCol_MapOfShape.hxx>
|
#include <TopTools_MapOfShape.hxx>
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function :
|
//function :
|
||||||
@ -119,11 +118,11 @@ void GEOMAlgo_RemoverWebs::BuildSolid()
|
|||||||
TopoDS_Iterator aIt1, aIt2;
|
TopoDS_Iterator aIt1, aIt2;
|
||||||
TopoDS_Shape aShape;
|
TopoDS_Shape aShape;
|
||||||
BRep_Builder aBB;
|
BRep_Builder aBB;
|
||||||
BOPCol_MapOfShape aMFence;
|
TopTools_MapOfShape aMFence;
|
||||||
BOPCol_IndexedMapOfShape aMSI;
|
TopTools_IndexedMapOfShape aMSI;
|
||||||
BOPCol_IndexedDataMapOfShapeListOfShape aMFS;
|
TopTools_IndexedDataMapOfShapeListOfShape aMFS;
|
||||||
BOPCol_ListOfShape aSFS;
|
TopTools_ListOfShape aSFS;
|
||||||
BOPCol_ListIteratorOfListOfShape aItLS;
|
TopTools_ListIteratorOfListOfShape aItLS;
|
||||||
BOPAlgo_BuilderSolid aSB;
|
BOPAlgo_BuilderSolid aSB;
|
||||||
//
|
//
|
||||||
//modified by NIZNHY-PKV Thu Jul 11 06:54:51 2013f
|
//modified by NIZNHY-PKV Thu Jul 11 06:54:51 2013f
|
||||||
@ -144,7 +143,7 @@ void GEOMAlgo_RemoverWebs::BuildSolid()
|
|||||||
//
|
//
|
||||||
aNbR=aMFence.Extent();
|
aNbR=aMFence.Extent();
|
||||||
if (aNbS!=aNbR) {
|
if (aNbS!=aNbR) {
|
||||||
BOPCol_MapIteratorOfMapOfShape aItMS;
|
TopTools_MapIteratorOfMapOfShape aItMS;
|
||||||
//
|
//
|
||||||
BOPTools_AlgoTools::MakeContainer(TopAbs_COMPOUND, aShape);
|
BOPTools_AlgoTools::MakeContainer(TopAbs_COMPOUND, aShape);
|
||||||
//
|
//
|
||||||
@ -159,7 +158,7 @@ void GEOMAlgo_RemoverWebs::BuildSolid()
|
|||||||
aNbF2=0;
|
aNbF2=0;
|
||||||
//
|
//
|
||||||
// 1. aSFS: Faces
|
// 1. aSFS: Faces
|
||||||
BOPTools::MapShapesAndAncestors(aShape, TopAbs_FACE, TopAbs_SOLID, aMFS);
|
TopExp::MapShapesAndAncestors(aShape, TopAbs_FACE, TopAbs_SOLID, aMFS);
|
||||||
//
|
//
|
||||||
aNbF=aMFS.Extent();
|
aNbF=aMFS.Extent();
|
||||||
for (i=1; i<=aNbF; ++i) {
|
for (i=1; i<=aNbF; ++i) {
|
||||||
@ -175,7 +174,7 @@ void GEOMAlgo_RemoverWebs::BuildSolid()
|
|||||||
aSFS.Append(aFi);
|
aSFS.Append(aFi);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const BOPCol_ListOfShape& aLSx=aMFS(i);
|
const TopTools_ListOfShape& aLSx=aMFS(i);
|
||||||
aNbSx=aLSx.Extent();
|
aNbSx=aLSx.Extent();
|
||||||
if (aNbSx==1) {
|
if (aNbSx==1) {
|
||||||
aSFS.Append(aFx);
|
aSFS.Append(aFx);
|
||||||
@ -221,7 +220,7 @@ void GEOMAlgo_RemoverWebs::BuildSolid()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
const BOPCol_ListOfShape& aLSR=aSB.Areas();
|
const TopTools_ListOfShape& aLSR=aSB.Areas();
|
||||||
//
|
//
|
||||||
// 4 Add the internals
|
// 4 Add the internals
|
||||||
if (aNbSI) {
|
if (aNbSI) {
|
||||||
@ -239,14 +238,14 @@ void GEOMAlgo_RemoverWebs::BuildSolid()
|
|||||||
//function : AddInternalShapes
|
//function : AddInternalShapes
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void GEOMAlgo_RemoverWebs::AddInternalShapes(const BOPCol_ListOfShape& aLSR,
|
void GEOMAlgo_RemoverWebs::AddInternalShapes(const TopTools_ListOfShape& aLSR,
|
||||||
const BOPCol_IndexedMapOfShape& aMSI)
|
const TopTools_IndexedMapOfShape& aMSI)
|
||||||
{
|
{
|
||||||
Standard_Integer i, aNbSI;
|
Standard_Integer i, aNbSI;
|
||||||
TopAbs_State aState;
|
TopAbs_State aState;
|
||||||
TopoDS_Solid aSd;
|
TopoDS_Solid aSd;
|
||||||
BRep_Builder aBB;
|
BRep_Builder aBB;
|
||||||
BOPCol_ListIteratorOfListOfShape aItLS;
|
TopTools_ListIteratorOfListOfShape aItLS;
|
||||||
Handle(IntTools_Context) aCtx=new IntTools_Context;
|
Handle(IntTools_Context) aCtx=new IntTools_Context;
|
||||||
//
|
//
|
||||||
aNbSI=aMSI.Extent();
|
aNbSI=aMSI.Extent();
|
||||||
|
@ -38,8 +38,8 @@
|
|||||||
#include <Standard_Macro.hxx>
|
#include <Standard_Macro.hxx>
|
||||||
//
|
//
|
||||||
#include <GEOMAlgo_ShapeAlgo.hxx>
|
#include <GEOMAlgo_ShapeAlgo.hxx>
|
||||||
#include <BOPCol_ListOfShape.hxx>
|
#include <TopTools_ListOfShape.hxx>
|
||||||
#include <BOPCol_IndexedMapOfShape.hxx>
|
#include <TopTools_IndexedMapOfShape.hxx>
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function : GEOMAlgo_RemoverWebs
|
//function : GEOMAlgo_RemoverWebs
|
||||||
@ -66,8 +66,8 @@ protected:
|
|||||||
void BuildSolid() ;
|
void BuildSolid() ;
|
||||||
|
|
||||||
Standard_EXPORT
|
Standard_EXPORT
|
||||||
static void AddInternalShapes(const BOPCol_ListOfShape& ,
|
static void AddInternalShapes(const TopTools_ListOfShape& ,
|
||||||
const BOPCol_IndexedMapOfShape& );
|
const TopTools_IndexedMapOfShape& );
|
||||||
//
|
//
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -48,8 +48,8 @@
|
|||||||
|
|
||||||
#include <BOPTools_AlgoTools.hxx>
|
#include <BOPTools_AlgoTools.hxx>
|
||||||
|
|
||||||
#include <BOPCol_DataMapOfShapeListOfShape.hxx>
|
#include <TopTools_DataMapOfShapeListOfShape.hxx>
|
||||||
#include <BOPCol_ListOfShape.hxx>
|
#include <TopTools_ListOfShape.hxx>
|
||||||
#include <IntTools_Context.hxx>
|
#include <IntTools_Context.hxx>
|
||||||
#include <BOPDS_DS.hxx>
|
#include <BOPDS_DS.hxx>
|
||||||
#include <BOPAlgo_Builder.hxx>
|
#include <BOPAlgo_Builder.hxx>
|
||||||
@ -206,7 +206,7 @@ void GEOMAlgo_ShellSolid::Perform()
|
|||||||
//
|
//
|
||||||
const BOPDS_DS& aDS=myDSFiller->DS();
|
const BOPDS_DS& aDS=myDSFiller->DS();
|
||||||
BOPDS_DS* pDS=(BOPDS_DS*)&aDS;
|
BOPDS_DS* pDS=(BOPDS_DS*)&aDS;
|
||||||
const BOPCol_ListOfShape& aLS=pDS->Arguments();
|
const TopTools_ListOfShape& aLS=pDS->Arguments();
|
||||||
//
|
//
|
||||||
aNbArgs=aLS.Extent();
|
aNbArgs=aLS.Extent();
|
||||||
if (aNbArgs!=2) {
|
if (aNbArgs!=2) {
|
||||||
@ -245,7 +245,7 @@ void GEOMAlgo_ShellSolid::Perform()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
const BOPCol_DataMapOfShapeListOfShape& aImages=aSSB.Images();
|
const TopTools_DataMapOfShapeListOfShape& aImages=aSSB.Images();
|
||||||
//
|
//
|
||||||
//-------------------------------
|
//-------------------------------
|
||||||
for (i=iBeg; i<=iEnd; ++i) {
|
for (i=iBeg; i<=iEnd; ++i) {
|
||||||
@ -268,7 +268,7 @@ void GEOMAlgo_ShellSolid::Perform()
|
|||||||
aState=BOPTools_AlgoTools::ComputeState(aP, aSolid, aTol, aCtx);
|
aState=BOPTools_AlgoTools::ComputeState(aP, aSolid, aTol, aCtx);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
const BOPCol_ListOfShape& aLSp=aImages.Find(aS);
|
const TopTools_ListOfShape& aLSp=aImages.Find(aS);
|
||||||
aNbSp=aLSp.Extent();
|
aNbSp=aLSp.Extent();
|
||||||
if (aNbSp>0) {
|
if (aNbSp>0) {
|
||||||
continue;
|
continue;
|
||||||
|
@ -36,14 +36,14 @@
|
|||||||
|
|
||||||
#include <BRep_Builder.hxx>
|
#include <BRep_Builder.hxx>
|
||||||
|
|
||||||
#include <BOPCol_MapOfShape.hxx>
|
#include <TopTools_MapOfShape.hxx>
|
||||||
#include <BOPCol_ListOfShape.hxx>
|
#include <TopTools_ListOfShape.hxx>
|
||||||
|
|
||||||
#include <BOPTools.hxx>
|
#include <TopExp.hxx>
|
||||||
|
|
||||||
static
|
static
|
||||||
void TreatCompound(const TopoDS_Shape& aC,
|
void TreatCompound(const TopoDS_Shape& aC,
|
||||||
BOPCol_ListOfShape& aLSX);
|
TopTools_ListOfShape& aLSX);
|
||||||
|
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
//function :
|
//function :
|
||||||
@ -95,7 +95,7 @@ void GEOMAlgo_Splitter::AddTool(const TopoDS_Shape& theShape)
|
|||||||
//function : Tools
|
//function : Tools
|
||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
const BOPCol_ListOfShape& GEOMAlgo_Splitter::Tools()const
|
const TopTools_ListOfShape& GEOMAlgo_Splitter::Tools()const
|
||||||
{
|
{
|
||||||
return myTools;
|
return myTools;
|
||||||
}
|
}
|
||||||
@ -150,8 +150,8 @@ void GEOMAlgo_Splitter::BuildResult(const TopAbs_ShapeEnum theType)
|
|||||||
{
|
{
|
||||||
TopAbs_ShapeEnum aType;
|
TopAbs_ShapeEnum aType;
|
||||||
BRep_Builder aBB;
|
BRep_Builder aBB;
|
||||||
BOPCol_MapOfShape aM;
|
TopTools_MapOfShape aM;
|
||||||
BOPCol_ListIteratorOfListOfShape aIt, aItIm;
|
TopTools_ListIteratorOfListOfShape aIt, aItIm;
|
||||||
//
|
//
|
||||||
aIt.Initialize(myArguments);
|
aIt.Initialize(myArguments);
|
||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
@ -159,7 +159,7 @@ void GEOMAlgo_Splitter::BuildResult(const TopAbs_ShapeEnum theType)
|
|||||||
aType=aS.ShapeType();
|
aType=aS.ShapeType();
|
||||||
if (aType==theType && !myMapTools.Contains(aS)) {
|
if (aType==theType && !myMapTools.Contains(aS)) {
|
||||||
if (myImages.IsBound(aS)) {
|
if (myImages.IsBound(aS)) {
|
||||||
const BOPCol_ListOfShape& aLSIm=myImages.Find(aS);
|
const TopTools_ListOfShape& aLSIm=myImages.Find(aS);
|
||||||
aItIm.Initialize(aLSIm);
|
aItIm.Initialize(aLSIm);
|
||||||
for (; aItIm.More(); aItIm.Next()) {
|
for (; aItIm.More(); aItIm.Next()) {
|
||||||
const TopoDS_Shape& aSIm=aItIm.Value();
|
const TopoDS_Shape& aSIm=aItIm.Value();
|
||||||
@ -186,11 +186,11 @@ void GEOMAlgo_Splitter::PostTreat()
|
|||||||
Standard_Integer i, aNbS;
|
Standard_Integer i, aNbS;
|
||||||
BRep_Builder aBB;
|
BRep_Builder aBB;
|
||||||
TopoDS_Compound aC;
|
TopoDS_Compound aC;
|
||||||
BOPCol_IndexedMapOfShape aMx;
|
TopTools_IndexedMapOfShape aMx;
|
||||||
//
|
//
|
||||||
aBB.MakeCompound(aC);
|
aBB.MakeCompound(aC);
|
||||||
//
|
//
|
||||||
BOPTools::MapShapes(myShape, myLimit, aMx);
|
TopExp::MapShapes(myShape, myLimit, aMx);
|
||||||
aNbS=aMx.Extent();
|
aNbS=aMx.Extent();
|
||||||
for (i=1; i<=aNbS; ++i) {
|
for (i=1; i<=aNbS; ++i) {
|
||||||
const TopoDS_Shape& aS=aMx(i);
|
const TopoDS_Shape& aS=aMx(i);
|
||||||
@ -199,9 +199,9 @@ void GEOMAlgo_Splitter::PostTreat()
|
|||||||
if (myLimitMode) {
|
if (myLimitMode) {
|
||||||
Standard_Integer iType, iLimit, iTypeX;
|
Standard_Integer iType, iLimit, iTypeX;
|
||||||
TopAbs_ShapeEnum aType, aTypeX;
|
TopAbs_ShapeEnum aType, aTypeX;
|
||||||
BOPCol_ListOfShape aLSP, aLSX;
|
TopTools_ListOfShape aLSP, aLSX;
|
||||||
BOPCol_ListIteratorOfListOfShape aIt, aItX, aItIm;
|
TopTools_ListIteratorOfListOfShape aIt, aItX, aItIm;
|
||||||
BOPCol_MapOfShape aM;
|
TopTools_MapOfShape aM;
|
||||||
//
|
//
|
||||||
iLimit=(Standard_Integer)myLimit;
|
iLimit=(Standard_Integer)myLimit;
|
||||||
//
|
//
|
||||||
@ -239,13 +239,13 @@ void GEOMAlgo_Splitter::PostTreat()
|
|||||||
}// for (; aIt.More(); aIt.Next()) {
|
}// for (; aIt.More(); aIt.Next()) {
|
||||||
//
|
//
|
||||||
aMx.Clear();
|
aMx.Clear();
|
||||||
BOPTools::MapShapes(aC, aMx);
|
TopExp::MapShapes(aC, aMx);
|
||||||
// 2. Add them to aC
|
// 2. Add them to aC
|
||||||
aIt.Initialize(aLSP);
|
aIt.Initialize(aLSP);
|
||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
const TopoDS_Shape& aS=aIt.Value();
|
const TopoDS_Shape& aS=aIt.Value();
|
||||||
if (myImages.IsBound(aS)) {
|
if (myImages.IsBound(aS)) {
|
||||||
const BOPCol_ListOfShape& aLSIm=myImages.Find(aS);
|
const TopTools_ListOfShape& aLSIm=myImages.Find(aS);
|
||||||
aItIm.Initialize(aLSIm);
|
aItIm.Initialize(aLSIm);
|
||||||
for (; aItIm.More(); aItIm.Next()) {
|
for (; aItIm.More(); aItIm.Next()) {
|
||||||
const TopoDS_Shape& aSIm=aItIm.Value();
|
const TopoDS_Shape& aSIm=aItIm.Value();
|
||||||
@ -270,7 +270,7 @@ void GEOMAlgo_Splitter::PostTreat()
|
|||||||
//
|
//
|
||||||
Standard_Integer aNbS;
|
Standard_Integer aNbS;
|
||||||
TopoDS_Iterator aIt;
|
TopoDS_Iterator aIt;
|
||||||
BOPCol_ListOfShape aLS;
|
TopTools_ListOfShape aLS;
|
||||||
//
|
//
|
||||||
aIt.Initialize(myShape);
|
aIt.Initialize(myShape);
|
||||||
for (; aIt.More(); aIt.Next()) {
|
for (; aIt.More(); aIt.Next()) {
|
||||||
@ -289,12 +289,12 @@ void GEOMAlgo_Splitter::PostTreat()
|
|||||||
//purpose :
|
//purpose :
|
||||||
//=======================================================================
|
//=======================================================================
|
||||||
void TreatCompound(const TopoDS_Shape& aC1,
|
void TreatCompound(const TopoDS_Shape& aC1,
|
||||||
BOPCol_ListOfShape& aLSX)
|
TopTools_ListOfShape& aLSX)
|
||||||
{
|
{
|
||||||
Standard_Integer aNbC1;
|
Standard_Integer aNbC1;
|
||||||
TopAbs_ShapeEnum aType;
|
TopAbs_ShapeEnum aType;
|
||||||
BOPCol_ListOfShape aLC, aLC1;
|
TopTools_ListOfShape aLC, aLC1;
|
||||||
BOPCol_ListIteratorOfListOfShape aIt, aIt1;
|
TopTools_ListIteratorOfListOfShape aIt, aIt1;
|
||||||
TopoDS_Iterator aItC;
|
TopoDS_Iterator aItC;
|
||||||
//
|
//
|
||||||
aLC.Append (aC1);
|
aLC.Append (aC1);
|
||||||
|
@ -37,8 +37,8 @@
|
|||||||
|
|
||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
|
|
||||||
#include <BOPCol_ListOfShape.hxx>
|
#include <TopTools_ListOfShape.hxx>
|
||||||
#include <BOPCol_MapOfShape.hxx>
|
#include <TopTools_MapOfShape.hxx>
|
||||||
|
|
||||||
#include <BOPAlgo_Builder.hxx>
|
#include <BOPAlgo_Builder.hxx>
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ class GEOMAlgo_Splitter : public BOPAlgo_Builder
|
|||||||
void AddTool(const TopoDS_Shape& theShape);
|
void AddTool(const TopoDS_Shape& theShape);
|
||||||
|
|
||||||
Standard_EXPORT
|
Standard_EXPORT
|
||||||
const BOPCol_ListOfShape& Tools()const;
|
const TopTools_ListOfShape& Tools()const;
|
||||||
|
|
||||||
Standard_EXPORT
|
Standard_EXPORT
|
||||||
void SetLimit(const TopAbs_ShapeEnum aLimit);
|
void SetLimit(const TopAbs_ShapeEnum aLimit);
|
||||||
@ -88,8 +88,8 @@ class GEOMAlgo_Splitter : public BOPAlgo_Builder
|
|||||||
virtual void PostTreat();
|
virtual void PostTreat();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
BOPCol_ListOfShape myTools;
|
TopTools_ListOfShape myTools;
|
||||||
BOPCol_MapOfShape myMapTools;
|
TopTools_MapOfShape myMapTools;
|
||||||
TopAbs_ShapeEnum myLimit;
|
TopAbs_ShapeEnum myLimit;
|
||||||
Standard_Integer myLimitMode;
|
Standard_Integer myLimitMode;
|
||||||
};
|
};
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
#include <BRep_Tool.hxx>
|
#include <BRep_Tool.hxx>
|
||||||
#include <BRepClass3d_SolidClassifier.hxx>
|
#include <BRepClass3d_SolidClassifier.hxx>
|
||||||
//
|
//
|
||||||
#include <BOPCol_ListOfShape.hxx>
|
#include <TopTools_ListOfShape.hxx>
|
||||||
#include <IntTools_Context.hxx>
|
#include <IntTools_Context.hxx>
|
||||||
//
|
//
|
||||||
#include <BOPDS_DS.hxx>
|
#include <BOPDS_DS.hxx>
|
||||||
@ -93,7 +93,7 @@ void GEOMAlgo_VertexSolid::Perform()
|
|||||||
TopTools_IndexedMapOfShape aM;
|
TopTools_IndexedMapOfShape aM;
|
||||||
//
|
//
|
||||||
const BOPDS_DS& aDS=myDSFiller->DS();
|
const BOPDS_DS& aDS=myDSFiller->DS();
|
||||||
const BOPCol_ListOfShape& aLS=aDS.Arguments();
|
const TopTools_ListOfShape& aLS=aDS.Arguments();
|
||||||
aNbArgs=aLS.Extent();
|
aNbArgs=aLS.Extent();
|
||||||
if (aNbArgs!=2) {
|
if (aNbArgs!=2) {
|
||||||
myErrorStatus=14;
|
myErrorStatus=14;
|
||||||
@ -136,7 +136,7 @@ void GEOMAlgo_VertexSolid::BuildResult()
|
|||||||
BOPDS_VectorOfInterfVE& aVEs=pDS->InterfVE();
|
BOPDS_VectorOfInterfVE& aVEs=pDS->InterfVE();
|
||||||
BOPDS_VectorOfInterfVF& aVFs=pDS->InterfVF();
|
BOPDS_VectorOfInterfVF& aVFs=pDS->InterfVF();
|
||||||
//
|
//
|
||||||
const BOPCol_ListOfShape& aLS=aDS.Arguments();
|
const TopTools_ListOfShape& aLS=aDS.Arguments();
|
||||||
const TopoDS_Shape& aObj=aLS.First();
|
const TopoDS_Shape& aObj=aLS.First();
|
||||||
//
|
//
|
||||||
const TopoDS_Shape& aTool=aLS.Last();
|
const TopoDS_Shape& aTool=aLS.Last();
|
||||||
@ -161,7 +161,7 @@ void GEOMAlgo_VertexSolid::BuildResult()
|
|||||||
iFound=0;
|
iFound=0;
|
||||||
//
|
//
|
||||||
// 1
|
// 1
|
||||||
aNbVV=aVVs.Extent();
|
aNbVV=aVVs.Length();
|
||||||
for (j=0; j<aNbVV; ++j) {
|
for (j=0; j<aNbVV; ++j) {
|
||||||
BOPDS_InterfVV& aVV=aVVs(j);
|
BOPDS_InterfVV& aVV=aVVs(j);
|
||||||
if (aVV.Contains(i)) {
|
if (aVV.Contains(i)) {
|
||||||
@ -174,7 +174,7 @@ void GEOMAlgo_VertexSolid::BuildResult()
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// 2
|
// 2
|
||||||
aNbVE=aVEs.Extent();
|
aNbVE=aVEs.Length();
|
||||||
for (j=0; j<aNbVE; ++j) {
|
for (j=0; j<aNbVE; ++j) {
|
||||||
BOPDS_InterfVE& aVE=aVEs(j);
|
BOPDS_InterfVE& aVE=aVEs(j);
|
||||||
if (aVE.Contains(i)) {
|
if (aVE.Contains(i)) {
|
||||||
@ -187,7 +187,7 @@ void GEOMAlgo_VertexSolid::BuildResult()
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
// 3
|
// 3
|
||||||
aNbVF=aVFs.Extent();
|
aNbVF=aVFs.Length();
|
||||||
for (j=0; j<aNbVF; ++j) {
|
for (j=0; j<aNbVF; ++j) {
|
||||||
BOPDS_InterfVF& aVF=aVFs(j);
|
BOPDS_InterfVF& aVF=aVFs(j);
|
||||||
if (aVF.Contains(i)) {
|
if (aVF.Contains(i)) {
|
||||||
|
@ -80,7 +80,7 @@ void GEOMAlgo_WireSolid::Perform()
|
|||||||
Standard_Integer aNbArgs;
|
Standard_Integer aNbArgs;
|
||||||
//
|
//
|
||||||
const BOPDS_DS& aDS=myDSFiller->DS();
|
const BOPDS_DS& aDS=myDSFiller->DS();
|
||||||
const BOPCol_ListOfShape& aLS=aDS.Arguments();
|
const TopTools_ListOfShape& aLS=aDS.Arguments();
|
||||||
aNbArgs=aLS.Extent();
|
aNbArgs=aLS.Extent();
|
||||||
if (!aNbArgs) {
|
if (!aNbArgs) {
|
||||||
myErrorStatus=13;
|
myErrorStatus=13;
|
||||||
@ -115,7 +115,7 @@ void GEOMAlgo_WireSolid::BuildResult()
|
|||||||
const BOPDS_DS& aDS=myDSFiller->DS();
|
const BOPDS_DS& aDS=myDSFiller->DS();
|
||||||
BOPDS_DS* pDS=(BOPDS_DS*)&aDS;
|
BOPDS_DS* pDS=(BOPDS_DS*)&aDS;
|
||||||
//
|
//
|
||||||
const BOPCol_ListOfShape& aLS=pDS->Arguments();
|
const TopTools_ListOfShape& aLS=pDS->Arguments();
|
||||||
aNbArgs=aLS.Extent();
|
aNbArgs=aLS.Extent();
|
||||||
if (aNbArgs!=2) {
|
if (aNbArgs!=2) {
|
||||||
myErrorStatus=14;
|
myErrorStatus=14;
|
||||||
|
@ -145,7 +145,7 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(Handle(TFunction_Logbook)& log)
|
|||||||
if (isCheckSelfInte) {
|
if (isCheckSelfInte) {
|
||||||
BOPAlgo_CheckerSI aCSI; // checker of self-interferences
|
BOPAlgo_CheckerSI aCSI; // checker of self-interferences
|
||||||
aCSI.SetLevelOfCheck(BOP_SELF_INTERSECTIONS_LEVEL);
|
aCSI.SetLevelOfCheck(BOP_SELF_INTERSECTIONS_LEVEL);
|
||||||
BOPCol_ListOfShape aList1, aList2;
|
TopTools_ListOfShape aList1, aList2;
|
||||||
aList1.Append(aShape1);
|
aList1.Append(aShape1);
|
||||||
aList2.Append(aShape2);
|
aList2.Append(aShape2);
|
||||||
aCSI.SetArguments(aList1);
|
aCSI.SetArguments(aList1);
|
||||||
@ -201,7 +201,7 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(Handle(TFunction_Logbook)& log)
|
|||||||
|
|
||||||
if (isCheckSelfInte) {
|
if (isCheckSelfInte) {
|
||||||
aCSI.SetLevelOfCheck(BOP_SELF_INTERSECTIONS_LEVEL);
|
aCSI.SetLevelOfCheck(BOP_SELF_INTERSECTIONS_LEVEL);
|
||||||
BOPCol_ListOfShape aList1;
|
TopTools_ListOfShape aList1;
|
||||||
aList1.Append(aShape);
|
aList1.Append(aShape);
|
||||||
aCSI.SetArguments(aList1);
|
aCSI.SetArguments(aList1);
|
||||||
aCSI.Perform();
|
aCSI.Perform();
|
||||||
@ -225,7 +225,7 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(Handle(TFunction_Logbook)& log)
|
|||||||
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is not valid");
|
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is not valid");
|
||||||
|
|
||||||
if (isCheckSelfInte) {
|
if (isCheckSelfInte) {
|
||||||
BOPCol_ListOfShape aList2;
|
TopTools_ListOfShape aList2;
|
||||||
aList2.Append(aShape2);
|
aList2.Append(aShape2);
|
||||||
aCSI.SetArguments(aList2);
|
aCSI.SetArguments(aList2);
|
||||||
aCSI.Perform();
|
aCSI.Perform();
|
||||||
@ -266,7 +266,7 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(Handle(TFunction_Logbook)& log)
|
|||||||
|
|
||||||
if (isCheckSelfInte) {
|
if (isCheckSelfInte) {
|
||||||
aCSI.SetLevelOfCheck(BOP_SELF_INTERSECTIONS_LEVEL);
|
aCSI.SetLevelOfCheck(BOP_SELF_INTERSECTIONS_LEVEL);
|
||||||
BOPCol_ListOfShape aList1;
|
TopTools_ListOfShape aList1;
|
||||||
aList1.Append(aShape);
|
aList1.Append(aShape);
|
||||||
aCSI.SetArguments(aList1);
|
aCSI.SetArguments(aList1);
|
||||||
aCSI.Perform();
|
aCSI.Perform();
|
||||||
@ -296,7 +296,7 @@ Standard_Integer GEOMImpl_BooleanDriver::Execute(Handle(TFunction_Logbook)& log)
|
|||||||
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is not valid");
|
StdFail_NotDone::Raise("Boolean operation will not be performed, because argument shape is not valid");
|
||||||
|
|
||||||
if (isCheckSelfInte) {
|
if (isCheckSelfInte) {
|
||||||
BOPCol_ListOfShape aList2;
|
TopTools_ListOfShape aList2;
|
||||||
aList2.Append(aTool);
|
aList2.Append(aTool);
|
||||||
aCSI.SetArguments(aList2);
|
aCSI.SetArguments(aList2);
|
||||||
aCSI.Perform();
|
aCSI.Perform();
|
||||||
@ -354,7 +354,7 @@ TopoDS_Shape GEOMImpl_BooleanDriver::makeCompoundShellFromFaces
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
BOPCol_ListOfShape aListShapes;
|
TopTools_ListOfShape aListShapes;
|
||||||
BOPTools_AlgoTools::MakeConnexityBlocks(aFaces, TopAbs_EDGE, TopAbs_FACE, aListShapes);
|
BOPTools_AlgoTools::MakeConnexityBlocks(aFaces, TopAbs_EDGE, TopAbs_FACE, aListShapes);
|
||||||
|
|
||||||
if (aListShapes.IsEmpty())
|
if (aListShapes.IsEmpty())
|
||||||
@ -362,7 +362,7 @@ TopoDS_Shape GEOMImpl_BooleanDriver::makeCompoundShellFromFaces
|
|||||||
|
|
||||||
TopoDS_Compound aResult;
|
TopoDS_Compound aResult;
|
||||||
B.MakeCompound(aResult);
|
B.MakeCompound(aResult);
|
||||||
BOPCol_ListIteratorOfListOfShape anIter(aListShapes);
|
TopTools_ListIteratorOfListOfShape anIter(aListShapes);
|
||||||
|
|
||||||
for (; anIter.More(); anIter.Next()) {
|
for (; anIter.More(); anIter.Next()) {
|
||||||
TopoDS_Shell aShell;
|
TopoDS_Shell aShell;
|
||||||
|
@ -38,9 +38,8 @@
|
|||||||
// OCCT Includes
|
// OCCT Includes
|
||||||
#include <Bnd_Box.hxx>
|
#include <Bnd_Box.hxx>
|
||||||
#include <BOPAlgo_CheckerSI.hxx>
|
#include <BOPAlgo_CheckerSI.hxx>
|
||||||
#include <BOPCol_ListOfShape.hxx>
|
#include <TopTools_ListOfShape.hxx>
|
||||||
#include <BOPDS_DS.hxx>
|
#include <BOPDS_DS.hxx>
|
||||||
#include <BOPDS_MapOfPassKey.hxx>
|
|
||||||
#include <BOPDS_MapOfPair.hxx>
|
#include <BOPDS_MapOfPair.hxx>
|
||||||
#include <BOPDS_Pair.hxx>
|
#include <BOPDS_Pair.hxx>
|
||||||
#include <BRepBndLib.hxx>
|
#include <BRepBndLib.hxx>
|
||||||
@ -1551,7 +1550,7 @@ bool GEOMImpl_IMeasureOperations::CheckSelfIntersections
|
|||||||
TopTools_IndexedMapOfShape anIndices;
|
TopTools_IndexedMapOfShape anIndices;
|
||||||
TopExp::MapShapes(aScopy, anIndices);
|
TopExp::MapShapes(aScopy, anIndices);
|
||||||
|
|
||||||
BOPCol_ListOfShape aLCS;
|
TopTools_ListOfShape aLCS;
|
||||||
aLCS.Append(aScopy);
|
aLCS.Append(aScopy);
|
||||||
//
|
//
|
||||||
BOPAlgo_CheckerSI aCSI; // checker of self-interferences
|
BOPAlgo_CheckerSI aCSI; // checker of self-interferences
|
||||||
@ -1748,7 +1747,7 @@ bool GEOMImpl_IMeasureOperations::FastIntersect (Handle(GEOM_Object) theShape1,
|
|||||||
TopExp::MapShapes(aScopy1, anIndices1);
|
TopExp::MapShapes(aScopy1, anIndices1);
|
||||||
TopExp::MapShapes(aScopy2, anIndices2);
|
TopExp::MapShapes(aScopy2, anIndices2);
|
||||||
|
|
||||||
BOPCol_ListOfShape aLCS1, aLCS2;
|
TopTools_ListOfShape aLCS1, aLCS2;
|
||||||
aLCS1.Append(aScopy1); aLCS2.Append(aScopy2);
|
aLCS1.Append(aScopy1); aLCS2.Append(aScopy2);
|
||||||
//
|
//
|
||||||
BRepExtrema_ShapeProximity aBSP; // checker of fast interferences
|
BRepExtrema_ShapeProximity aBSP; // checker of fast interferences
|
||||||
|
@ -45,8 +45,8 @@
|
|||||||
#include <StdFail_NotDone.hxx>
|
#include <StdFail_NotDone.hxx>
|
||||||
#include <BOPAlgo_CheckerSI.hxx>
|
#include <BOPAlgo_CheckerSI.hxx>
|
||||||
#include <BOPAlgo_Alerts.hxx>
|
#include <BOPAlgo_Alerts.hxx>
|
||||||
#include <BOPCol_IndexedDataMapOfShapeListOfShape.hxx>
|
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
|
||||||
#include <BOPCol_ListOfShape.hxx>
|
#include <TopTools_ListOfShape.hxx>
|
||||||
#include <BOPDS_DS.hxx>
|
#include <BOPDS_DS.hxx>
|
||||||
|
|
||||||
// Depth of self-intersection check (see BOPAlgo_CheckerSI::SetLevelOfCheck() for more details)
|
// Depth of self-intersection check (see BOPAlgo_CheckerSI::SetLevelOfCheck() for more details)
|
||||||
@ -101,7 +101,7 @@ static void PrepareShapes (const TopoDS_Shape& theShape,
|
|||||||
static void CheckSelfIntersection(const TopoDS_Shape &theShape)
|
static void CheckSelfIntersection(const TopoDS_Shape &theShape)
|
||||||
{
|
{
|
||||||
BOPAlgo_CheckerSI aCSI; // checker of self-interferences
|
BOPAlgo_CheckerSI aCSI; // checker of self-interferences
|
||||||
BOPCol_ListOfShape aList;
|
TopTools_ListOfShape aList;
|
||||||
|
|
||||||
aList.Append(theShape);
|
aList.Append(theShape);
|
||||||
aCSI.SetLevelOfCheck(BOP_SELF_INTERSECTIONS_LEVEL);
|
aCSI.SetLevelOfCheck(BOP_SELF_INTERSECTIONS_LEVEL);
|
||||||
@ -436,7 +436,7 @@ Standard_Integer GEOMImpl_PartitionDriver::Execute(Handle(TFunction_Logbook)& lo
|
|||||||
TopExp::MapShapes(aShape, aResIndices);
|
TopExp::MapShapes(aShape, aResIndices);
|
||||||
|
|
||||||
// Map: source_shape/images of source_shape in Result
|
// Map: source_shape/images of source_shape in Result
|
||||||
const BOPCol_IndexedDataMapOfShapeListOfShape& aMR = PS.ImagesResult();
|
const TopTools_IndexedDataMapOfShapeListOfShape& aMR = PS.ImagesResult();
|
||||||
//const TopTools_IndexedDataMapOfShapeListOfShape& aMR = PS.ImagesResult();
|
//const TopTools_IndexedDataMapOfShapeListOfShape& aMR = PS.ImagesResult();
|
||||||
|
|
||||||
// history for all argument shapes
|
// history for all argument shapes
|
||||||
@ -468,13 +468,13 @@ Standard_Integer GEOMImpl_PartitionDriver::Execute(Handle(TFunction_Logbook)& lo
|
|||||||
//
|
//
|
||||||
if (!aMR.Contains(anEntity)) continue;
|
if (!aMR.Contains(anEntity)) continue;
|
||||||
|
|
||||||
const BOPCol_ListOfShape& aModified = aMR.FindFromKey(anEntity);
|
const TopTools_ListOfShape& aModified = aMR.FindFromKey(anEntity);
|
||||||
//const TopTools_ListOfShape& aModified = aMR.FindFromKey(anEntity);
|
//const TopTools_ListOfShape& aModified = aMR.FindFromKey(anEntity);
|
||||||
Standard_Integer nbModified = aModified.Extent();
|
Standard_Integer nbModified = aModified.Extent();
|
||||||
|
|
||||||
if (nbModified > 0) { // Mantis issue 0021182
|
if (nbModified > 0) { // Mantis issue 0021182
|
||||||
int ih = 1;
|
int ih = 1;
|
||||||
BOPCol_ListIteratorOfListOfShape itM (aModified);
|
TopTools_ListIteratorOfListOfShape itM (aModified);
|
||||||
for (; itM.More() && nbModified > 0; itM.Next(), ++ih) {
|
for (; itM.More() && nbModified > 0; itM.Next(), ++ih) {
|
||||||
if (!aResIndices.Contains(itM.Value())) {
|
if (!aResIndices.Contains(itM.Value())) {
|
||||||
nbModified = 0;
|
nbModified = 0;
|
||||||
@ -487,7 +487,7 @@ Standard_Integer GEOMImpl_PartitionDriver::Execute(Handle(TFunction_Logbook)& lo
|
|||||||
TDataStd_IntegerArray::Set(aWhatHistoryLabel, 1, nbModified);
|
TDataStd_IntegerArray::Set(aWhatHistoryLabel, 1, nbModified);
|
||||||
|
|
||||||
int ih = 1;
|
int ih = 1;
|
||||||
BOPCol_ListIteratorOfListOfShape itM (aModified);
|
TopTools_ListIteratorOfListOfShape itM (aModified);
|
||||||
//TopTools_ListIteratorOfListOfShape itM (aModified);
|
//TopTools_ListIteratorOfListOfShape itM (aModified);
|
||||||
for (; itM.More(); itM.Next(), ++ih) {
|
for (; itM.More(); itM.Next(), ++ih) {
|
||||||
int id = aResIndices.FindIndex(itM.Value());
|
int id = aResIndices.FindIndex(itM.Value());
|
||||||
|
@ -744,7 +744,7 @@ Standard_Integer GEOMImpl_ShapeDriver::Execute(Handle(TFunction_Logbook)& log) c
|
|||||||
unsigned int ind, nbshapes = aShapes->Length();
|
unsigned int ind, nbshapes = aShapes->Length();
|
||||||
|
|
||||||
// add faces
|
// add faces
|
||||||
BOPCol_ListOfShape aLS;
|
TopTools_ListOfShape aLS;
|
||||||
for (ind = 1; ind <= nbshapes; ind++) {
|
for (ind = 1; ind <= nbshapes; ind++) {
|
||||||
Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast(aShapes->Value(ind));
|
Handle(GEOM_Function) aRefShape = Handle(GEOM_Function)::DownCast(aShapes->Value(ind));
|
||||||
TopoDS_Shape aShape_i = aRefShape->GetValue();
|
TopoDS_Shape aShape_i = aRefShape->GetValue();
|
||||||
|
Loading…
Reference in New Issue
Block a user