1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File: GEOMAlgo_Builder_2.cxx
24 // Author: Peter KURNEV
26 #include <GEOMAlgo_Builder.hxx>
28 #include <TColStd_IndexedMapOfInteger.hxx>
29 #include <TColStd_ListOfInteger.hxx>
31 #include <TopAbs_Orientation.hxx>
34 #include <TopoDS_Face.hxx>
35 #include <TopoDS_Edge.hxx>
36 #include <TopoDS_Shape.hxx>
37 #include <TopoDS_Compound.hxx>
39 #include <TopTools_IndexedMapOfShape.hxx>
40 #include <TopTools_ListOfShape.hxx>
41 #include <TopTools_MapOfShape.hxx>
42 #include <TopTools_ListIteratorOfListOfShape.hxx>
45 #include <TopExp_Explorer.hxx>
47 #include <BRep_Tool.hxx>
48 #include <BRep_Builder.hxx>
49 #include <BRepAlgo_Image.hxx>
50 #include <BRepTools.hxx>
52 #include <IntTools_Context.hxx>
53 #include <IntTools_FClass2d.hxx>
55 #include <BooleanOperations_OnceExplorer.hxx>
56 #include <BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger.hxx>
57 #include <BOPTools_ListOfPaveBlock.hxx>
58 #include <BOPTools_ListIteratorOfListOfPaveBlock.hxx>
59 #include <BOPTools_CArray1OfSSInterference.hxx>
60 #include <BOPTools_SSInterference.hxx>
61 #include <BOPTools_SequenceOfCurves.hxx>
62 #include <BOPTools_Curve.hxx>
63 #include <BOPTools_ListOfPaveBlock.hxx>
64 #include <BOPTools_PaveBlock.hxx>
65 #include <BOPTools_Tools3D.hxx>
66 #include <BOPTools_CArray1OfVSInterference.hxx>
67 #include <BOPTools_VSInterference.hxx>
68 #include <BOPTools_ESInterference.hxx>
69 #include <BOPTools_CArray1OfESInterference.hxx>
71 #include <NMTDS_ShapesDataStructure.hxx>
72 #include <NMTTools_PaveFiller.hxx>
73 #include <NMTTools_ListOfCoupleOfShape.hxx>
74 #include <NMTTools_Tools.hxx>
75 #include <NMTTools_CoupleOfShape.hxx>
76 #include <NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx>
77 #include <NMTTools_Tools.hxx>
78 #include <NMTTools_ListIteratorOfListOfCommonBlock.hxx>
79 #include <NMTTools_ListOfCommonBlock.hxx>
80 #include <NMTTools_CommonBlock.hxx>
81 #include <NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx>
83 #include <GEOMAlgo_Tools3D.hxx>
84 #include <GEOMAlgo_WireEdgeSet.hxx>
85 #include <GEOMAlgo_BuilderFace.hxx>
86 #include <NMTDS_InterfPool.hxx>
89 void UpdateCandidates(const Standard_Integer ,
90 const Standard_Integer ,
91 NMTTools_IndexedDataMapOfIndexedMapOfInteger& );
93 //=======================================================================
94 //function : FillImagesFaces
96 //=======================================================================
97 void GEOMAlgo_Builder::FillImagesFaces()
103 FillSameDomainFaces();
105 FillInternalVertices();
107 //=======================================================================
108 // function: FillIn2DParts
110 //=======================================================================
111 void GEOMAlgo_Builder::FillIn2DParts()
113 const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
114 NMTTools_PaveFiller* pPF=myPaveFiller;
115 NMTDS_InterfPool* pIP=pPF->IP();
116 BOPTools_CArray1OfSSInterference& aFFs=pIP->SSInterferences();
117 NMTTools_CommonBlockPool& aCBP=pPF->ChangeCommonBlockPool();
119 Standard_Integer j, nSpIn, nSpSc, aNbCurves;
120 Standard_Integer aNbS, nF, aNbCBP, n1, n2, aNbFFs, aNbSpIn;
121 TopTools_MapOfShape aMFence;
122 TopTools_ListOfShape aLSpIn;
124 NMTTools_ListIteratorOfListOfCommonBlock aItCB;
125 BOPTools_ListIteratorOfListOfPaveBlock aItPB;
129 aNbFFs=aFFs.Extent();
130 aNbCBP=aCBP.Extent();
132 aNbS=aDS.NumberOfShapesOfTheObject();
133 for (nF=1; nF<=aNbS; ++nF) {
134 if (aDS.GetShapeType(nF)!=TopAbs_FACE) {
138 aF=TopoDS::Face(aDS.Shape(nF));
144 for (j=1; j<=aNbCBP; ++j) {
145 NMTTools_ListOfCommonBlock& aLCB=aCBP(j);
146 aItCB.Initialize(aLCB);
147 for (; aItCB.More(); aItCB.Next()) {
148 NMTTools_CommonBlock& aCB=aItCB.Value();
149 if (aCB.IsPaveBlockOnFace(nF)) {
150 const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1();
152 const TopoDS_Shape& aSpIn=aDS.Shape(nSpIn);
153 if (aMFence.Add(aSpIn)){
154 aLSpIn.Append(aSpIn);
161 for (j=1; j<=aNbFFs; ++j) {
162 BOPTools_SSInterference& aFF=aFFs(j);
164 if (!(n1==nF || n2==nF)) {
167 BOPTools_SequenceOfCurves& aSC=aFF.Curves();
168 aNbCurves=aSC.Length();
173 const BOPTools_Curve& aBC=aSC(1);
174 const BOPTools_ListOfPaveBlock& aLPB=aBC.NewPaveBlocks();
175 aItPB.Initialize(aLPB);
176 for (; aItPB.More(); aItPB.Next()) {
177 const BOPTools_PaveBlock& aPBSc=aItPB.Value();
179 const TopoDS_Shape& aSpSc=aDS.Shape(nSpSc);
180 if (aMFence.Add(aSpSc)){
181 aLSpIn.Append(aSpSc);
185 aNbSpIn=aLSpIn.Extent();
187 myInParts.Add(aF, aLSpIn);
189 }//for (nF=1; nF<=aNbS; ++nF) {
191 //=======================================================================
192 // function: BuildSplitFaces
194 //=======================================================================
195 void GEOMAlgo_Builder::BuildSplitFaces()
197 const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
198 NMTTools_PaveFiller* pPF=myPaveFiller;
199 NMTDS_InterfPool* pIP=pPF->IP();
200 BOPTools_CArray1OfSSInterference& aFFs=pIP->SSInterferences();
201 IntTools_Context& aCtx= pPF->ChangeContext();
203 Standard_Boolean bToReverse, bIsClosed, bIsDegenerated;
204 Standard_Integer i, aNb, aNbF, nF;
205 TopTools_MapOfShape aMFence;
206 TColStd_IndexedMapOfInteger aMFP;
207 TopExp_Explorer anExp;
209 TopoDS_Edge aSp, aEE;
210 TopTools_ListIteratorOfListOfShape aIt;
211 TopAbs_Orientation anOriF, anOriE;
213 mySplitFaces.Clear();
215 // 1. Select Faces to process (MFP)
216 aNb=aDS.NumberOfShapesOfTheObject();
217 for (i=1; i<=aNb; ++i) {
218 const TopoDS_Shape& aF=aDS.Shape(i);
219 if (aF.ShapeType()!=TopAbs_FACE) {
222 if (!aMFence.Add(aF)) {
226 if (myInParts.Contains(aF)) {
231 anExp.Init(aF, TopAbs_EDGE);
232 for (; anExp.More(); anExp.Next()) {
233 const TopoDS_Shape& aE=anExp.Current();
234 if (myImages.HasImage(aE)) {
242 Standard_Integer aNbFFs, aNbSE, j, n1, n2;
244 aNbFFs=aFFs.Extent();
245 for (j=1; j<=aNbFFs; ++j) {
246 BOPTools_SSInterference& aFFj=aFFs(j);
247 aFFj.Indices(n1, n2);
248 if (!(n1==i || n2==i)) {
252 const TColStd_ListOfInteger& aLSE=aFFj.SharedEdges();
261 }// for (i=1; i<=aNb; ++i)
265 for (i=1; i<=aNbF; ++i) {
267 const TopoDS_Face& aF=TopoDS::Face(aDS.Shape(nF));
268 anOriF=aF.Orientation();
270 aFF.Orientation(TopAbs_FORWARD);
275 GEOMAlgo_WireEdgeSet aWES;
278 // 2.1.1. Add Split parts
279 anExp.Init(aFF, TopAbs_EDGE);
280 for (; anExp.More(); anExp.Next()) {
281 const TopoDS_Edge& aE=TopoDS::Edge(anExp.Current());
282 anOriE=aE.Orientation();
284 if (!myImages.HasImage(aE)) {
285 if (anOriE==TopAbs_INTERNAL) {
287 aEE.Orientation(TopAbs_FORWARD);
288 aWES.AddStartElement(aEE);
289 aEE.Orientation(TopAbs_REVERSED);
290 aWES.AddStartElement(aEE);
293 aWES.AddStartElement(aE);
298 bIsDegenerated=BRep_Tool::Degenerated(aE);
299 bIsClosed=BRep_Tool::IsClosed(aE, aF);
301 const TopTools_ListOfShape& aLIE=myImages.Image(aE);
302 aIt.Initialize(aLIE);
303 for (; aIt.More(); aIt.Next()) {
304 aSp=TopoDS::Edge(aIt.Value());
306 if (bIsDegenerated) {
307 aSp.Orientation(anOriE);
308 aWES.AddStartElement(aSp);
312 if (anOriE==TopAbs_INTERNAL) {
313 aSp.Orientation(TopAbs_FORWARD);
314 aWES.AddStartElement(aSp);
315 aSp.Orientation(TopAbs_REVERSED);
316 aWES.AddStartElement(aSp);
321 if (aMFence.Add(aSp)) {
323 if (!BRep_Tool::IsClosed(aSp, aF)){
324 BOPTools_Tools3D::DoSplitSEAMOnFace(aSp, aF);
327 aSp.Orientation(TopAbs_FORWARD);
328 aWES.AddStartElement(aSp);
329 aSp.Orientation(TopAbs_REVERSED);
330 aWES.AddStartElement(aSp);
333 }// if (aMFence.Add(aSp))
335 aSp.Orientation(anOriE);
336 bToReverse=BOPTools_Tools3D::IsSplitToReverse1(aSp, aE, aCtx);
340 aWES.AddStartElement(aSp);
341 }// for (; aIt.More(); aIt.Next()) {
342 }// for (; anExp.More(); anExp.Next()) {
344 // 2.1.2. Add In2D Parts
345 if (myInParts.Contains(aF)) {
346 const TopTools_ListOfShape& aLE=myInParts.FindFromKey(aF);
348 for (; aIt.More(); aIt.Next()) {
349 aSp=TopoDS::Edge(aIt.Value());
351 aSp.Orientation(TopAbs_FORWARD);
352 aWES.AddStartElement(aSp);
354 aSp.Orientation(TopAbs_REVERSED);
355 aWES.AddStartElement(aSp);
359 // 2.2. Build images Faces
360 GEOMAlgo_BuilderFace aBF;
363 aBF.SetContext(aCtx);
364 const TopTools_ListOfShape& aSE=aWES.StartElements();
371 TopTools_ListIteratorOfListOfShape aItx;
373 aBBx.MakeCompound(aCx);
375 aItx.Initialize(aSE);
376 for (; aItx.More(); aItx.Next()) {
377 TopoDS_Shape& aEx=aItx.Value();
389 const TopTools_ListOfShape& aLF=aBF.Areas();
391 TopTools_ListOfShape aLFR;
394 for (; aIt.More(); aIt.Next()) {
395 TopoDS_Shape& aFR=aIt.Value();
396 if (anOriF==TopAbs_REVERSED) {
397 aFR.Orientation(TopAbs_REVERSED);
402 // 2.3. Collect draft images Faces
403 mySplitFaces.Bind(aF, aLFR);
404 }//for (i=1; i<=aNbF; ++i)
406 //=======================================================================
407 // function: FillSameDomainFaces
409 //=======================================================================
410 void GEOMAlgo_Builder::FillSameDomainFaces()
412 const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
413 NMTTools_PaveFiller* pPF=myPaveFiller;
414 NMTDS_InterfPool* pIP=pPF->IP();
415 BOPTools_CArray1OfSSInterference& aFFs=pIP->SSInterferences();
416 IntTools_Context& aCtx= pPF->ChangeContext();
418 Standard_Boolean bIsSDF;
419 Standard_Integer i, j, aNbFF, nF1, nF2, aNbPBInOn, aNbC, aNbSE;
420 TopTools_MapOfShape aMFence;
421 TopTools_ListIteratorOfListOfShape aItF1, aItF2;
422 NMTTools_ListOfCoupleOfShape aLCS;
424 //mySameDomainShapes.Clear();
426 // 1. For each FF find among images of faces
427 // all pairs of same domain faces (SDF) [=> aLCS]
429 for (i=1; i<=aNbFF; ++i) {
430 BOPTools_SSInterference& aFF=aFFs(i);
431 aFF.Indices(nF1, nF2);
433 const TopoDS_Face& aF1=TopoDS::Face(aDS.Shape(nF1));
434 const TopoDS_Face& aF2=TopoDS::Face(aDS.Shape(nF2));
436 // if there are no in/on 2D split parts the faces nF1, nF2
438 const BOPTools_ListOfPaveBlock& aLPBInOn=aFF.PaveBlocks();
439 aNbPBInOn=aLPBInOn.Extent();
442 const TColStd_ListOfInteger& aLSE=aFF.SharedEdges();
444 if (!aNbPBInOn && !aNbSE) {
449 // if there is at least one section edge between faces nF1, nF2
450 // they can not be SDF
451 BOPTools_SequenceOfCurves& aSC=aFF.Curves();
457 // the faces are suspected to be SDF.
458 // Try to find SDF among images of nF1, nF2
460 const TopTools_ListOfShape& aLF1=mySplitFaces.Image(aF1);
461 const TopTools_ListOfShape& aLF2=mySplitFaces.Image(aF2);
463 aItF1.Initialize(aLF1);
464 for (; aItF1.More(); aItF1.Next()) {
465 const TopoDS_Face& aF1x=TopoDS::Face(aItF1.Value());
467 aItF2.Initialize(aLF2);
468 for (; aItF2.More(); aItF2.Next()) {
469 const TopoDS_Face& aF2y=TopoDS::Face(aItF2.Value());
470 bIsSDF=NMTTools_Tools::AreFacesSameDomain(aF1x, aF2y, aCtx);
472 if (aMFence.Contains(aF1x) ||
473 aMFence.Contains(aF2y)) {
479 NMTTools_CoupleOfShape aCS;
486 if (!mySplitFaces.HasImage(aF1)) {
487 mySplitFaces.Bind(aF1, aF1);
491 if (!mySplitFaces.HasImage(aF2)) {
492 mySplitFaces.Bind(aF2, aF2);
500 }//for (i=1; i<=aNbFF; ++i)
508 NMTTools_IndexedDataMapOfShapeIndexedMapOfShape aMC;
510 NMTTools_Tools::FindChains(aLCS, aMC);
512 // 3. Fill the map of SDF mySameDomainFaces
514 for (i=1; i<=aNbC; ++i) {
515 const TopoDS_Shape& aF=aMC.FindKey(i);
516 const TopTools_IndexedMapOfShape& aMSDF=aMC(i);
518 aNbFF=aMSDF.Extent();
519 for (j=1; j<=aNbFF; ++j) {
520 const TopoDS_Shape& aFSD=aMSDF(j);
521 mySameDomainShapes.Add(aFSD, aF);
526 //=======================================================================
527 // function: FillImagesFaces1
529 //=======================================================================
530 void GEOMAlgo_Builder::FillImagesFaces1()
532 Standard_Integer i, aNb, iSense;
533 TopoDS_Face aF, aFSp, aFSD;
534 TopTools_ListOfShape aLFx;
535 TopTools_ListIteratorOfListOfShape aIt;
537 const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
539 aNb=aDS.NumberOfShapesOfTheObject();
540 for (i=1; i<=aNb; ++i) {
541 const TopoDS_Shape& aS=aDS.Shape(i);
542 if (aS.ShapeType()!=TopAbs_FACE) {
546 if (!mySplitFaces.HasImage(aS)) {
553 const TopTools_ListOfShape& aLF=mySplitFaces.Image(aF);
555 for (; aIt.More(); aIt.Next()) {
556 aFSp=TopoDS::Face(aIt.Value());
557 if (!mySameDomainShapes.Contains(aFSp)) {
561 const TopoDS_Shape& aSx=mySameDomainShapes.FindFromKey(aFSp);
562 aFSD=TopoDS::Face(aSx);
563 iSense=GEOMAlgo_Tools3D::Sense(aFSp, aFSD);
570 if (!myImages.HasImage(aF)) {//XX
571 myImages.Bind(aF, aLFx);
575 //=======================================================================
576 // function: FillInternalVertices
578 //=======================================================================
579 void GEOMAlgo_Builder::FillInternalVertices()
581 const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
582 NMTTools_PaveFiller* pPF=myPaveFiller;
583 NMTDS_InterfPool* pIP=pPF->IP();
584 IntTools_Context& aCtx= pPF->ChangeContext();
586 BOPTools_CArray1OfSSInterference& aFFs=pIP->SSInterferences();
587 BOPTools_CArray1OfVSInterference& aVFs=pIP->VSInterferences();
588 BOPTools_CArray1OfESInterference& aEFs=pIP->ESInterferences();
589 const NMTTools_IndexedDataMapOfIndexedMapOfInteger& aMAV=pPF->AloneVertices();
591 Standard_Boolean bHasImage;
592 Standard_Integer i, j, nF, aNbS, nV, nVSD, n1, n2, iFlag;
593 Standard_Integer aNbVFs, aNbAVF, aNbEFs, aNbVC, aNbE, aNbV;
594 Standard_Real aU1, aU2, aTol;
595 NMTTools_IndexedDataMapOfIndexedMapOfInteger aMFMV;
596 TopTools_MapOfShape aMFence;
597 TopTools_ListIteratorOfListOfShape aIt, aItV;
600 // 1. Collect face-vertex candidates [aMFMV]
603 aNbVFs=aVFs.Extent();
604 for (i=1; i<=aNbVFs; ++i) {
605 const BOPTools_VSInterference& aVS=aVFs(i);
609 if (aDS.Shape(n1).ShapeType()==TopAbs_FACE) {
613 nVSD=pPF->FindSDVertex(nV);
618 UpdateCandidates(nF, nV, aMFMV);
622 aNbEFs=aEFs.Extent();
623 for (i=1; i<=aNbEFs; ++i) {
624 const BOPTools_ESInterference& aEF=aEFs(i);
630 const TopoDS_Shape& aSnew=aDS.Shape(nV);
631 if (aSnew.ShapeType()!=TopAbs_VERTEX) {
635 nF=(aDS.Shape(n1).ShapeType()==TopAbs_FACE) ? n1 : n2;
636 nVSD=pPF->FindSDVertex(nV);
640 UpdateCandidates(nF, nV, aMFMV);
643 aNbS=aDS.NumberOfShapesOfTheObject();
644 for (nF=1; nF<=aNbS; ++nF) {
645 const TopoDS_Shape& aF=aDS.Shape(nF);
647 if (aF.ShapeType()!=TopAbs_FACE) {
650 if (!aMFence.Add(aF)) {
654 const TopoDS_Face& aFF=TopoDS::Face(aF);
655 aTol=BRep_Tool::Tolerance(aFF);
658 if (aMAV.Contains(nF)) {
659 const TColStd_IndexedMapOfInteger& aMAVF=aMAV.FindFromKey(nF);
660 aNbAVF=aMAVF.Extent();
661 for (j=1; j<=aNbAVF; ++j) {
663 nVSD=pPF->FindSDVertex(nV);
668 UpdateCandidates(nF, nV, aMFMV);
672 // 1.4 Internal vertices of the face nF
673 BooleanOperations_OnceExplorer aExp(aDS);
674 aExp.Init(nF, TopAbs_VERTEX);
675 for (; aExp.More(); aExp.Next()) {
677 const TopoDS_Shape& aV=aDS.Shape(nV);
678 if (aV.Orientation()==TopAbs_INTERNAL) {
679 nVSD=pPF->FindSDVertex(nV);
684 UpdateCandidates(nF, nV, aMFMV);
688 // 2. Process face nF
689 if (!aMFMV.Contains(nF)) {
693 const TColStd_IndexedMapOfInteger& aMVC=aMFMV.FindFromKey(nF);
699 // 2.1 Refine candidates
700 TopTools_IndexedDataMapOfShapeListOfShape aMVE;
701 TopTools_ListOfShape aLV;
703 bHasImage=myImages.HasImage(aF);
705 const TopTools_ListOfShape& aLFx=myImages.Image(aF);
706 aIt.Initialize(aLFx);
707 for (; aIt.More(); aIt.Next()) {
708 const TopoDS_Shape& aFx=aIt.Value();
709 TopExp::MapShapesAndAncestors(aFx, TopAbs_VERTEX, TopAbs_EDGE, aMVE);
713 Standard_Boolean bFaceToProcess;
715 TopExp::MapShapesAndAncestors(aF, TopAbs_VERTEX, TopAbs_EDGE, aMVE);
716 bFaceToProcess=Standard_False;
717 for (j=1; j<=aNbVC; ++j) {
719 const TopoDS_Shape& aV=aDS.Shape(nV);
720 if (!aMVE.Contains(aV)) {
721 bFaceToProcess=!bFaceToProcess;
725 if (!bFaceToProcess) {
730 for (j=1; j<=aNbVC; ++j) {
732 const TopoDS_Shape& aV=aDS.Shape(nV);
733 if (aMVE.Contains(aV)) {
734 const TopTools_ListOfShape& aLE=aMVE.FindFromKey(aV);
745 // 3. Try to put vertices into the face(s)
746 aItV.Initialize(aLV);
747 for (; aItV.More(); aItV.Next()) {
748 TopoDS_Vertex aV=TopoDS::Vertex(aItV.Value());
749 aV.Orientation(TopAbs_INTERNAL);
751 bHasImage=myImages.HasImage(aF);
753 const TopTools_ListOfShape& aLFx=myImages.Image(aF);
754 aIt.Initialize(aLFx);
755 for (; aIt.More(); aIt.Next()) {
756 TopoDS_Face aFx=TopoDS::Face(aIt.Value());
758 IntTools_FClass2d& aClsf=aCtx.FClass2d(aFx);
759 aClsf.Init(aFx, aTol);
761 iFlag=aCtx.ComputeVS (aV, aFx, aU1, aU2);
769 const TopoDS_Face& aFx=TopoDS::Face(aF);
771 IntTools_FClass2d& aClsf=aCtx.FClass2d(aFx);
772 aClsf.Init(aFx, aTol);
774 iFlag=aCtx.ComputeVS (aV, aFx, aU1, aU2);
778 GEOMAlgo_Tools3D::CopyFace(aFx, aFz);
780 myImages.Bind(aF, aFz);
783 }// for (; aItV.More(); aItV.Next()) {
785 }// for (nF=1; nF<=aNb; ++nF) {
787 //=======================================================================
788 // function: UpdateCandidates
790 //=======================================================================
791 void UpdateCandidates(const Standard_Integer theNF,
792 const Standard_Integer theNV,
793 NMTTools_IndexedDataMapOfIndexedMapOfInteger& theMFMV)
795 if (theMFMV.Contains(theNF)) {
796 TColStd_IndexedMapOfInteger& aMV=theMFMV.ChangeFromKey(theNF);
800 TColStd_IndexedMapOfInteger aMV;
802 theMFMV.Add(theNF, aMV);