Skip to content

Commit

Permalink
Foundation Classes - Move Map's algo part to external file #213
Browse files Browse the repository at this point in the history
Add NCollection_MapAlgo header with map operations.
Mark as deprecated boolean algo in NCollection_Map.
  • Loading branch information
dpasukhi committed Dec 27, 2024
1 parent 1b4bb62 commit eba97b1
Show file tree
Hide file tree
Showing 11 changed files with 402 additions and 250 deletions.
2 changes: 1 addition & 1 deletion src/BRepMesh/BRepMesh_FaceChecker.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ void BRepMesh_FaceChecker::collectResult()
const Handle(IMeshData::MapOfIEdgePtr)& aEdges = myWiresIntersectingEdges->Value(aWireIt);
if (!aEdges.IsNull())
{
myIntersectingEdges->Unite(*aEdges);
NCollection_MapAlgo::Unite(*myIntersectingEdges, *aEdges);
}
}
}
2 changes: 1 addition & 1 deletion src/BRepMesh/BRepMesh_ModelHealer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ Standard_Boolean BRepMesh_ModelHealer::popEdgesToUpdate(
Handle(IMeshData::MapOfIEdgePtr)& aIntersections = aFaceIt.ChangeValue();
if (!aIntersections.IsNull())
{
theEdgesToUpdate.Unite(*aIntersections);
NCollection_MapAlgo::Unite(theEdgesToUpdate, *aIntersections);
aIntersections.Nullify();
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/BRepMesh/BRepMesh_NURBSRangeSplitter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,8 @@ Handle(IMeshData::ListOfPnt2d) BRepMesh_NURBSRangeSplitter::GenerateSurfaceNodes
aFixedParams[0], aFixedParams[1]).GetControlParametersToRemove(theParameters),
};

aParamsToRemove[0]->Subtract(*aFixedParams[0]);
aParamsToRemove[1]->Subtract(*aFixedParams[1]);
NCollection_MapAlgo::Subtract(*aParamsToRemove[0], *aFixedParams[0]);
NCollection_MapAlgo::Subtract(*aParamsToRemove[1], *aFixedParams[1]);

// insert nodes of the regular grid
Handle(IMeshData::ListOfPnt2d) aNodes = new IMeshData::ListOfPnt2d(
Expand Down
10 changes: 5 additions & 5 deletions src/BRepOffset/BRepOffset_MakeOffset_1.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -3362,7 +3362,7 @@ Standard_Boolean BRepOffset_BuildOffsetFaces::CheckInvertedBlock (const TopoDS_S
GetVerticesOnEdges (aCB1, myInvertedEdges, *pMVInverted1, *pMVAll1);
}
//
if (pMVInverted->HasIntersection (*pMVAll1))
if (NCollection_MapAlgo::HasIntersection(*pMVInverted, *pMVAll1))
{
return Standard_False;
}
Expand Down Expand Up @@ -5886,8 +5886,8 @@ void BRepOffset_BuildOffsetFaces::IntersectFaces (TopTools_MapOfShape& theVertsT
mapShapes(*aLFImi, TopAbs_EDGE, aMEVIm);
mapShapes(*aLFImi, TopAbs_VERTEX, aMEVIm);

Standard_Boolean isIContainsE = aMEVIm.HasIntersection(anInsideEdges);
Standard_Boolean isIContainsV = aMEVIm.HasIntersection(anInsideVertices);
Standard_Boolean isIContainsE = NCollection_MapAlgo::HasIntersection(aMEVIm, anInsideEdges);
Standard_Boolean isIContainsV = NCollection_MapAlgo::HasIntersection(aMEVIm, anInsideVertices);

for (j = i + 1; j <= aNb; ++j)
{
Expand All @@ -5914,8 +5914,8 @@ void BRepOffset_BuildOffsetFaces::IntersectFaces (TopTools_MapOfShape& theVertsT
mapShapes(*aLFImj, TopAbs_VERTEX, aMEVIm);
// check images of both faces contain anInsideEdges and anInsideVertices
// not process if false and true
Standard_Boolean isJContainsE = aMEVIm.HasIntersection(anInsideEdges);
Standard_Boolean isJContainsV = aMEVIm.HasIntersection(anInsideVertices);
Standard_Boolean isJContainsE = NCollection_MapAlgo::HasIntersection(aMEVIm, anInsideEdges);
Standard_Boolean isJContainsV = NCollection_MapAlgo::HasIntersection(aMEVIm, anInsideVertices);

// Check if one face is connected to inside edge then
// the other must be also connected
Expand Down
1 change: 1 addition & 0 deletions src/NCollection/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ NCollection_List.hxx
NCollection_ListNode.hxx
NCollection_LocalArray.hxx
NCollection_Map.hxx
NCollection_MapAlgo.hxx
NCollection_Mat3.hxx
NCollection_Mat4.hxx
NCollection_OccAllocator.hxx
Expand Down
Loading

0 comments on commit eba97b1

Please sign in to comment.