mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-13 14:27:08 +03:00
Compare commits
1 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
71d98100fc |
@@ -1225,12 +1225,20 @@ const TopTools_ListOfShape& LocOpe_SplitShape::DescendantShapes
|
|||||||
Rebuild(myShape);
|
Rebuild(myShape);
|
||||||
myDone = Standard_True;
|
myDone = Standard_True;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef OCCT_DEBUG
|
#ifdef OCCT_DEBUG
|
||||||
if (!myDblE.IsEmpty()) {
|
if (!myDblE.IsEmpty()) {
|
||||||
std::cout << "Le shape comporte des faces invalides" << std::endl;
|
std::cout << "Le shape comporte des faces invalides" << std::endl;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (myMap.IsBound(S))
|
||||||
return myMap(S);
|
return myMap(S);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
static TopTools_ListOfShape anEmptyList;
|
||||||
|
return anEmptyList;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -116,6 +116,14 @@ void LocOpe_Spliter::Perform(const Handle(LocOpe_WiresOnShape)& PW)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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);
|
theSubs.Build(myShape);
|
||||||
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itdesc(myMap);
|
TopTools_DataMapIteratorOfDataMapOfShapeListOfShape itdesc(myMap);
|
||||||
if (theSubs.IsCopied(myShape)) {
|
if (theSubs.IsCopied(myShape)) {
|
||||||
@@ -201,6 +209,8 @@ void LocOpe_Spliter::Perform(const Handle(LocOpe_WiresOnShape)& PW)
|
|||||||
for (itdesc.Reset(); itdesc.More(); itdesc.Next()) {
|
for (itdesc.Reset(); itdesc.More(); itdesc.Next()) {
|
||||||
const TopoDS_Shape& sori = itdesc.Key();
|
const TopoDS_Shape& sori = itdesc.Key();
|
||||||
const TopoDS_Shape& scib = itdesc.Value().First();
|
const TopoDS_Shape& scib = itdesc.Value().First();
|
||||||
|
const TopTools_ListOfShape& aShapeList = theCFace.DescendantShapes(scib);
|
||||||
|
if (!aShapeList.IsEmpty())
|
||||||
myMap(sori) = theCFace.DescendantShapes(scib);
|
myMap(sori) = theCFace.DescendantShapes(scib);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -244,7 +244,7 @@ void LocOpe_WiresOnShape::BindAll()
|
|||||||
myMap.Bind(ite.Key(),ite.Value());
|
myMap.Bind(ite.Key(),ite.Value());
|
||||||
}
|
}
|
||||||
|
|
||||||
TopTools_IndexedDataMapOfShapeListOfShape Splits;
|
//TopTools_IndexedDataMapOfShapeListOfShape Splits;
|
||||||
Standard_Integer Ind;
|
Standard_Integer Ind;
|
||||||
TopTools_MapOfShape anOverlappedEdges;
|
TopTools_MapOfShape anOverlappedEdges;
|
||||||
for (Ind = 1; Ind <= myMapEF.Extent(); Ind++)
|
for (Ind = 1; Ind <= myMapEF.Extent(); Ind++)
|
||||||
@@ -261,21 +261,21 @@ void LocOpe_WiresOnShape::BindAll()
|
|||||||
if (myCheckInterior)
|
if (myCheckInterior)
|
||||||
{
|
{
|
||||||
Standard_Boolean isOverlapped = Standard_False;
|
Standard_Boolean isOverlapped = Standard_False;
|
||||||
FindInternalIntersections(edg, fac, Splits, isOverlapped);
|
FindInternalIntersections(edg, fac, mySplits, isOverlapped);
|
||||||
if(isOverlapped)
|
if(isOverlapped)
|
||||||
anOverlappedEdges.Add(edg);
|
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))
|
if(anOverlappedEdges.Contains(anEdge))
|
||||||
continue;
|
continue;
|
||||||
TopoDS_Shape aFace = myMapEF.FindFromKey(anEdge);
|
TopoDS_Shape aFace = myMapEF.FindFromKey(anEdge);
|
||||||
//Remove "anEdge" from "myMapEF"
|
//Remove "anEdge" from "myMapEF"
|
||||||
myMapEF.RemoveKey(anEdge);
|
myMapEF.RemoveKey(anEdge);
|
||||||
TopTools_ListIteratorOfListOfShape itl(Splits(Ind));
|
TopTools_ListIteratorOfListOfShape itl(mySplits(Ind));
|
||||||
for (; itl.More(); itl.Next())
|
for (; itl.More(); itl.Next())
|
||||||
myMapEF.Add(itl.Value(), aFace);
|
myMapEF.Add(itl.Value(), aFace);
|
||||||
}
|
}
|
||||||
|
@@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#include <TopoDS_Shape.hxx>
|
#include <TopoDS_Shape.hxx>
|
||||||
#include <TopTools_IndexedDataMapOfShapeShape.hxx>
|
#include <TopTools_IndexedDataMapOfShapeShape.hxx>
|
||||||
|
#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
|
||||||
#include <TopTools_MapOfShape.hxx>
|
#include <TopTools_MapOfShape.hxx>
|
||||||
#include <Standard_Boolean.hxx>
|
#include <Standard_Boolean.hxx>
|
||||||
#include <TopTools_DataMapOfShapeShape.hxx>
|
#include <TopTools_DataMapOfShapeShape.hxx>
|
||||||
@@ -109,7 +110,8 @@ public:
|
|||||||
//! tells is the face to be split by section or not
|
//! tells is the face to be split by section or not
|
||||||
Standard_Boolean IsFaceWithSection (const TopoDS_Shape& aFace) const;
|
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)
|
DEFINE_STANDARD_RTTIEXT(LocOpe_WiresOnShape,Standard_Transient)
|
||||||
@@ -125,6 +127,7 @@ private:
|
|||||||
TopoDS_Shape myShape;
|
TopoDS_Shape myShape;
|
||||||
TopTools_IndexedDataMapOfShapeShape myMapEF;
|
TopTools_IndexedDataMapOfShapeShape myMapEF;
|
||||||
TopTools_MapOfShape myFacesWithSection;
|
TopTools_MapOfShape myFacesWithSection;
|
||||||
|
TopTools_IndexedDataMapOfShapeListOfShape mySplits;
|
||||||
Standard_Boolean myCheckInterior;
|
Standard_Boolean myCheckInterior;
|
||||||
TopTools_DataMapOfShapeShape myMap;
|
TopTools_DataMapOfShapeShape myMap;
|
||||||
Standard_Boolean myDone;
|
Standard_Boolean myDone;
|
||||||
|
@@ -43,3 +43,13 @@ inline Standard_Boolean LocOpe_WiresOnShape::IsFaceWithSection(const TopoDS_Shap
|
|||||||
{
|
{
|
||||||
return (myFacesWithSection.Contains(aFace));
|
return (myFacesWithSection.Contains(aFace));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//=======================================================================
|
||||||
|
//function : Splits
|
||||||
|
//purpose :
|
||||||
|
//=======================================================================
|
||||||
|
|
||||||
|
inline const TopTools_IndexedDataMapOfShapeListOfShape& LocOpe_WiresOnShape::Splits()
|
||||||
|
{
|
||||||
|
return mySplits;
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user