Treatment of input embedded edges has been added to method Modified.
Rebuild(myShape);
myDone = Standard_True;
}
+
#ifdef OCCT_DEBUG
if (!myDblE.IsEmpty()) {
std::cout << "Le shape comporte des faces invalides" << std::endl;
}
#endif
- return myMap(S);
+
+ if (myMap.IsBound(S))
+ return myMap(S);
+ else
+ {
+ static TopTools_ListOfShape anEmptyList;
+ return anEmptyList;
+ }
}
}
}
+ const TopTools_IndexedDataMapOfShapeListOfShape& Splits = PW->Splits();
+ for (Standard_Integer i = 1; i <= Splits.Extent(); i++)
+ {
+ const TopoDS_Shape& anEdge = Splits.FindKey(i);
+ const TopTools_ListOfShape& aListEdges = Splits(i);
+ myMap.Bind (anEdge, aListEdges);
+ }
+
theSubs.Build(myShape);
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itdesc(myMap);
if (theSubs.IsCopied(myShape)) {
for (itdesc.Reset(); itdesc.More(); itdesc.Next()) {
const TopoDS_Shape& sori = itdesc.Key();
const TopoDS_Shape& scib = itdesc.Value().First();
- myMap(sori) = theCFace.DescendantShapes(scib);
+ const TopTools_ListOfShape& aShapeList = theCFace.DescendantShapes(scib);
+ if (!aShapeList.IsEmpty())
+ myMap(sori) = aShapeList;
}
const TopTools_ListOfShape& lres = myMap(myShape);
myDone = Standard_False;
myMap.Clear();
myMapEF.Clear();
+ myFacesWithSection.Clear();
+ mySplits.Clear();
}
//=======================================================================
myMap.Bind(ite.Key(),ite.Value());
}
- TopTools_IndexedDataMapOfShapeListOfShape Splits;
Standard_Integer Ind;
TopTools_MapOfShape anOverlappedEdges;
for (Ind = 1; Ind <= myMapEF.Extent(); Ind++)
if (myCheckInterior)
{
Standard_Boolean isOverlapped = Standard_False;
- FindInternalIntersections(edg, fac, Splits, isOverlapped);
+ FindInternalIntersections(edg, fac, mySplits, isOverlapped);
if(isOverlapped)
anOverlappedEdges.Add(edg);
}
}
- for (Ind = 1; Ind <= Splits.Extent(); Ind++)
+ for (Ind = 1; Ind <= mySplits.Extent(); Ind++)
{
- TopoDS_Shape anEdge = Splits.FindKey(Ind);
+ TopoDS_Shape anEdge = mySplits.FindKey(Ind);
if(anOverlappedEdges.Contains(anEdge))
continue;
TopoDS_Shape aFace = myMapEF.FindFromKey(anEdge);
//Remove "anEdge" from "myMapEF"
myMapEF.RemoveKey(anEdge);
- TopTools_ListIteratorOfListOfShape itl(Splits(Ind));
+ TopTools_ListIteratorOfListOfShape itl(mySplits(Ind));
for (; itl.More(); itl.Next())
myMapEF.Add(itl.Value(), aFace);
}
#include <TopoDS_Shape.hxx>
#include <TopTools_IndexedDataMapOfShapeShape.hxx>
+#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
#include <TopTools_MapOfShape.hxx>
#include <Standard_Boolean.hxx>
#include <TopTools_DataMapOfShapeShape.hxx>
//! tells is the face to be split by section or not
Standard_Boolean IsFaceWithSection (const TopoDS_Shape& aFace) const;
-
-
+ //! returns the map of edges embedded into the faces and their splits
+ Standard_EXPORT const TopTools_IndexedDataMapOfShapeListOfShape& Splits();
+
DEFINE_STANDARD_RTTIEXT(LocOpe_WiresOnShape,Standard_Transient)
TopoDS_Shape myShape;
TopTools_IndexedDataMapOfShapeShape myMapEF;
TopTools_MapOfShape myFacesWithSection;
+ TopTools_IndexedDataMapOfShapeListOfShape mySplits;
Standard_Boolean myCheckInterior;
TopTools_DataMapOfShapeShape myMap;
Standard_Boolean myDone;
{
return (myFacesWithSection.Contains(aFace));
}
+
+//=======================================================================
+//function : Splits
+//purpose :
+//=======================================================================
+
+inline const TopTools_IndexedDataMapOfShapeListOfShape& LocOpe_WiresOnShape::Splits()
+{
+ return mySplits;
+}