1 // Copyright (C) 2007-2010 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
23 // File: GEOMAlgo_Builder_2.cxx
25 // Author: Peter KURNEV
27 #include <GEOMAlgo_Builder.hxx>
29 #include <TColStd_IndexedMapOfInteger.hxx>
30 #include <TColStd_ListOfInteger.hxx>
32 #include <TopAbs_Orientation.hxx>
35 #include <TopoDS_Face.hxx>
36 #include <TopoDS_Edge.hxx>
37 #include <TopoDS_Shape.hxx>
38 #include <TopoDS_Compound.hxx>
40 #include <TopTools_IndexedMapOfShape.hxx>
41 #include <TopTools_ListOfShape.hxx>
42 #include <TopTools_MapOfShape.hxx>
43 #include <TopTools_ListIteratorOfListOfShape.hxx>
46 #include <TopExp_Explorer.hxx>
48 #include <BRep_Tool.hxx>
49 #include <BRep_Builder.hxx>
50 #include <BRepAlgo_Image.hxx>
51 #include <BRepTools.hxx>
53 #include <IntTools_Context.hxx>
54 #include <IntTools_FClass2d.hxx>
56 #include <BooleanOperations_OnceExplorer.hxx>
57 #include <BOPTColStd_IndexedDataMapOfIntegerIndexedMapOfInteger.hxx>
58 #include <BOPTools_ListOfPaveBlock.hxx>
59 #include <BOPTools_ListIteratorOfListOfPaveBlock.hxx>
60 #include <BOPTools_CArray1OfSSInterference.hxx>
61 #include <BOPTools_SSInterference.hxx>
62 #include <BOPTools_SequenceOfCurves.hxx>
63 #include <BOPTools_Curve.hxx>
64 #include <BOPTools_ListOfPaveBlock.hxx>
65 #include <BOPTools_PaveBlock.hxx>
66 #include <BOPTools_Tools3D.hxx>
67 #include <BOPTools_CArray1OfVSInterference.hxx>
68 #include <BOPTools_VSInterference.hxx>
69 #include <BOPTools_ESInterference.hxx>
70 #include <BOPTools_CArray1OfESInterference.hxx>
72 #include <NMTDS_ShapesDataStructure.hxx>
73 #include <NMTDS_InterfPool.hxx>
75 #include <NMTTools_PaveFiller.hxx>
76 #include <NMTTools_ListOfCoupleOfShape.hxx>
77 #include <NMTTools_Tools.hxx>
78 #include <NMTTools_CoupleOfShape.hxx>
79 #include <NMTTools_IndexedDataMapOfShapeIndexedMapOfShape.hxx>
80 #include <NMTTools_Tools.hxx>
81 #include <NMTTools_ListIteratorOfListOfCommonBlock.hxx>
82 #include <NMTTools_ListOfCommonBlock.hxx>
83 #include <NMTTools_CommonBlock.hxx>
84 #include <NMTTools_IndexedDataMapOfIndexedMapOfInteger.hxx>
86 #include <GEOMAlgo_Tools3D.hxx>
87 #include <GEOMAlgo_WireEdgeSet.hxx>
88 #include <GEOMAlgo_BuilderFace.hxx>
90 #include <GEOMAlgo_ShapeSet.hxx>
93 void UpdateCandidates(const Standard_Integer ,
94 const Standard_Integer ,
95 NMTTools_IndexedDataMapOfIndexedMapOfInteger& );
97 //=======================================================================
98 //function : FillImagesFaces
100 //=======================================================================
101 void GEOMAlgo_Builder::FillImagesFaces()
107 FillSameDomainFaces();
109 FillInternalVertices();
111 //=======================================================================
112 // function: FillIn2DParts
114 //=======================================================================
115 void GEOMAlgo_Builder::FillIn2DParts()
117 const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
118 NMTTools_PaveFiller* pPF=myPaveFiller;
119 NMTDS_InterfPool* pIP=pPF->IP();
120 BOPTools_CArray1OfSSInterference& aFFs=pIP->SSInterferences();
121 NMTTools_CommonBlockPool& aCBP=pPF->ChangeCommonBlockPool();
123 Standard_Integer j, nSpIn, nSpSc, aNbCurves;
124 Standard_Integer aNbS, nF, aNbCBP, n1, n2, aNbFFs, aNbSpIn;
125 TopTools_MapOfShape aMFence;
126 TopTools_ListOfShape aLSpIn;
128 NMTTools_ListIteratorOfListOfCommonBlock aItCB;
129 BOPTools_ListIteratorOfListOfPaveBlock aItPB;
133 aNbFFs=aFFs.Extent();
134 aNbCBP=aCBP.Extent();
136 aNbS=aDS.NumberOfShapesOfTheObject();
137 for (nF=1; nF<=aNbS; ++nF) {
138 if (aDS.GetShapeType(nF)!=TopAbs_FACE) {
142 aF=TopoDS::Face(aDS.Shape(nF));
148 for (j=1; j<=aNbCBP; ++j) {
149 NMTTools_ListOfCommonBlock& aLCB=aCBP(j);
150 aItCB.Initialize(aLCB);
151 for (; aItCB.More(); aItCB.Next()) {
152 NMTTools_CommonBlock& aCB=aItCB.Value();
153 if (aCB.IsPaveBlockOnFace(nF)) {
154 const BOPTools_PaveBlock& aPB1=aCB.PaveBlock1();
156 const TopoDS_Shape& aSpIn=aDS.Shape(nSpIn);
157 if (aMFence.Add(aSpIn)){
158 aLSpIn.Append(aSpIn);
165 for (j=1; j<=aNbFFs; ++j) {
166 BOPTools_SSInterference& aFF=aFFs(j);
168 if (!(n1==nF || n2==nF)) {
171 BOPTools_SequenceOfCurves& aSC=aFF.Curves();
172 aNbCurves=aSC.Length();
177 const BOPTools_Curve& aBC=aSC(1);
178 const BOPTools_ListOfPaveBlock& aLPB=aBC.NewPaveBlocks();
179 aItPB.Initialize(aLPB);
180 for (; aItPB.More(); aItPB.Next()) {
181 const BOPTools_PaveBlock& aPBSc=aItPB.Value();
183 const TopoDS_Shape& aSpSc=aDS.Shape(nSpSc);
184 if (aMFence.Add(aSpSc)){
185 aLSpIn.Append(aSpSc);
189 aNbSpIn=aLSpIn.Extent();
191 myInParts.Add(aF, aLSpIn);
193 }//for (nF=1; nF<=aNbS; ++nF) {
195 //=======================================================================
196 // function: BuildSplitFaces
198 //=======================================================================
199 void GEOMAlgo_Builder::BuildSplitFaces()
201 const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
202 NMTTools_PaveFiller* pPF=myPaveFiller;
203 NMTDS_InterfPool* pIP=pPF->IP();
204 BOPTools_CArray1OfSSInterference& aFFs=pIP->SSInterferences();
205 IntTools_Context& aCtx= pPF->ChangeContext();
207 Standard_Boolean bToReverse, bIsClosed, bIsDegenerated;
208 Standard_Integer i, aNb, aNbF, nF;
209 TopTools_MapOfShape aMFence;
210 TColStd_IndexedMapOfInteger aMFP;
211 TopExp_Explorer anExp;
213 TopoDS_Edge aSp, aEE;
214 TopTools_ListIteratorOfListOfShape aIt;
215 TopAbs_Orientation anOriF, anOriE;
217 mySplitFaces.Clear();
219 // 1. Select Faces to process (MFP)
220 aNb=aDS.NumberOfShapesOfTheObject();
221 for (i=1; i<=aNb; ++i) {
222 const TopoDS_Shape& aF=aDS.Shape(i);
223 if (aF.ShapeType()!=TopAbs_FACE) {
226 if (!aMFence.Add(aF)) {
230 if (myInParts.Contains(aF)) {
235 anExp.Init(aF, TopAbs_EDGE);
236 for (; anExp.More(); anExp.Next()) {
237 const TopoDS_Shape& aE=anExp.Current();
238 if (myImages.HasImage(aE)) {
246 Standard_Integer aNbFFs, aNbSE, j, n1, n2;
248 aNbFFs=aFFs.Extent();
249 for (j=1; j<=aNbFFs; ++j) {
250 BOPTools_SSInterference& aFFj=aFFs(j);
251 aFFj.Indices(n1, n2);
252 if (!(n1==i || n2==i)) {
256 const TColStd_ListOfInteger& aLSE=aFFj.SharedEdges();
260 //modified by NIZNHY-PKV Wed Oct 27 11:40:57 2010f
262 //modified by NIZNHY-PKV Wed Oct 27 11:41:07 2010t
268 }// for (i=1; i<=aNb; ++i)
272 for (i=1; i<=aNbF; ++i) {
274 const TopoDS_Face& aF=TopoDS::Face(aDS.Shape(nF));
275 anOriF=aF.Orientation();
277 aFF.Orientation(TopAbs_FORWARD);
282 GEOMAlgo_WireEdgeSet aWES;
285 // 2.1.1. Add Split parts
286 anExp.Init(aFF, TopAbs_EDGE);
287 for (; anExp.More(); anExp.Next()) {
288 const TopoDS_Edge& aE=TopoDS::Edge(anExp.Current());
289 anOriE=aE.Orientation();
291 if (!myImages.HasImage(aE)) {
292 if (anOriE==TopAbs_INTERNAL) {
294 aEE.Orientation(TopAbs_FORWARD);
295 aWES.AddStartElement(aEE);
296 aEE.Orientation(TopAbs_REVERSED);
297 aWES.AddStartElement(aEE);
300 aWES.AddStartElement(aE);
305 bIsDegenerated=BRep_Tool::Degenerated(aE);
306 bIsClosed=BRep_Tool::IsClosed(aE, aF);
308 const TopTools_ListOfShape& aLIE=myImages.Image(aE);
309 aIt.Initialize(aLIE);
310 for (; aIt.More(); aIt.Next()) {
311 aSp=TopoDS::Edge(aIt.Value());
313 if (bIsDegenerated) {
314 aSp.Orientation(anOriE);
315 aWES.AddStartElement(aSp);
319 if (anOriE==TopAbs_INTERNAL) {
320 aSp.Orientation(TopAbs_FORWARD);
321 aWES.AddStartElement(aSp);
322 aSp.Orientation(TopAbs_REVERSED);
323 aWES.AddStartElement(aSp);
328 if (aMFence.Add(aSp)) {
330 if (!BRep_Tool::IsClosed(aSp, aF)){
331 BOPTools_Tools3D::DoSplitSEAMOnFace(aSp, aF);
334 aSp.Orientation(TopAbs_FORWARD);
335 aWES.AddStartElement(aSp);
336 aSp.Orientation(TopAbs_REVERSED);
337 aWES.AddStartElement(aSp);
340 }// if (aMFence.Add(aSp))
342 aSp.Orientation(anOriE);
343 bToReverse=BOPTools_Tools3D::IsSplitToReverse1(aSp, aE, aCtx);
347 aWES.AddStartElement(aSp);
348 }// for (; aIt.More(); aIt.Next()) {
349 }// for (; anExp.More(); anExp.Next()) {
351 // 2.1.2. Add In2D Parts
352 if (myInParts.Contains(aF)) {
353 const TopTools_ListOfShape& aLE=myInParts.FindFromKey(aF);
355 for (; aIt.More(); aIt.Next()) {
356 aSp=TopoDS::Edge(aIt.Value());
358 aSp.Orientation(TopAbs_FORWARD);
359 aWES.AddStartElement(aSp);
361 aSp.Orientation(TopAbs_REVERSED);
362 aWES.AddStartElement(aSp);
366 // 2.2. Build images Faces
367 TopTools_ListOfShape aLFR;
368 GEOMAlgo_ShapeSet aS1, aS2;
370 const TopTools_ListOfShape& aSE=aWES.StartElements();
371 //modified by NIZNHY-PKV Thu Oct 28 08:30:41 2010f
373 aS2.Add(aFF, TopAbs_EDGE);
374 if (aS1.IsEqual(aS2)) {
377 //modified by NIZNHY-PKV Thu Oct 28 08:30:42 2010t
379 GEOMAlgo_BuilderFace aBF;
382 aBF.SetContext(aCtx);
387 const TopTools_ListOfShape& aLF=aBF.Areas();
389 for (; aIt.More(); aIt.Next()) {
390 TopoDS_Shape& aFR=aIt.Value();
391 if (anOriF==TopAbs_REVERSED) {
392 aFR.Orientation(TopAbs_REVERSED);
398 // 2.3. Collect draft images Faces
399 mySplitFaces.Bind(aF, aLFR);
400 }//for (i=1; i<=aNbF; ++i)
402 //=======================================================================
403 // function: FillSameDomainFaces
405 //=======================================================================
406 void GEOMAlgo_Builder::FillSameDomainFaces()
408 const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
409 NMTTools_PaveFiller* pPF=myPaveFiller;
410 NMTDS_InterfPool* pIP=pPF->IP();
411 BOPTools_CArray1OfSSInterference& aFFs=pIP->SSInterferences();
412 IntTools_Context& aCtx= pPF->ChangeContext();
414 Standard_Boolean bIsSDF;
415 Standard_Integer i, j, aNbFF, nF1, nF2, aNbPBInOn, aNbC, aNbSE;
416 TopTools_MapOfShape aMFence;
417 TopTools_ListIteratorOfListOfShape aItF1, aItF2;
418 NMTTools_ListOfCoupleOfShape aLCS;
420 //mySameDomainShapes.Clear();
422 // 1. For each FF find among images of faces
423 // all pairs of same domain faces (SDF) [=> aLCS]
425 for (i=1; i<=aNbFF; ++i) {
426 BOPTools_SSInterference& aFF=aFFs(i);
427 aFF.Indices(nF1, nF2);
429 const TopoDS_Face& aF1=TopoDS::Face(aDS.Shape(nF1));
430 const TopoDS_Face& aF2=TopoDS::Face(aDS.Shape(nF2));
432 // if there are no in/on 2D split parts the faces nF1, nF2
434 const BOPTools_ListOfPaveBlock& aLPBInOn=aFF.PaveBlocks();
435 aNbPBInOn=aLPBInOn.Extent();
438 const TColStd_ListOfInteger& aLSE=aFF.SharedEdges();
440 if (!aNbPBInOn && !aNbSE) {
445 // if there is at least one section edge between faces nF1, nF2
446 // they can not be SDF
447 BOPTools_SequenceOfCurves& aSC=aFF.Curves();
453 // the faces are suspected to be SDF.
454 // Try to find SDF among images of nF1, nF2
456 const TopTools_ListOfShape& aLF1=mySplitFaces.Image(aF1);
457 const TopTools_ListOfShape& aLF2=mySplitFaces.Image(aF2);
459 aItF1.Initialize(aLF1);
460 for (; aItF1.More(); aItF1.Next()) {
461 const TopoDS_Face& aF1x=TopoDS::Face(aItF1.Value());
463 aItF2.Initialize(aLF2);
464 for (; aItF2.More(); aItF2.Next()) {
465 const TopoDS_Face& aF2y=TopoDS::Face(aItF2.Value());
466 bIsSDF=NMTTools_Tools::AreFacesSameDomain(aF1x, aF2y, aCtx);
468 if (aMFence.Contains(aF1x) ||
469 aMFence.Contains(aF2y)) {
475 NMTTools_CoupleOfShape aCS;
482 if (!mySplitFaces.HasImage(aF1)) {
483 mySplitFaces.Bind(aF1, aF1);
487 if (!mySplitFaces.HasImage(aF2)) {
488 mySplitFaces.Bind(aF2, aF2);
496 }//for (i=1; i<=aNbFF; ++i)
504 NMTTools_IndexedDataMapOfShapeIndexedMapOfShape aMC;
506 NMTTools_Tools::FindChains(aLCS, aMC);
508 // 3. Fill the map of SDF mySameDomainFaces
510 for (i=1; i<=aNbC; ++i) {
511 const TopoDS_Shape& aF=aMC.FindKey(i);
512 const TopTools_IndexedMapOfShape& aMSDF=aMC(i);
514 aNbFF=aMSDF.Extent();
515 for (j=1; j<=aNbFF; ++j) {
516 const TopoDS_Shape& aFSD=aMSDF(j);
517 mySameDomainShapes.Add(aFSD, aF);
522 //=======================================================================
523 // function: FillImagesFaces1
525 //=======================================================================
526 void GEOMAlgo_Builder::FillImagesFaces1()
528 Standard_Integer i, aNb, iSense, aNbLFx;
529 TopoDS_Face aF, aFSp, aFSD;
530 TopTools_ListOfShape aLFx;
531 TopTools_ListIteratorOfListOfShape aIt;
533 const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
535 aNb=aDS.NumberOfShapesOfTheObject();
536 for (i=1; i<=aNb; ++i) {
537 const TopoDS_Shape& aS=aDS.Shape(i);
538 if (aS.ShapeType()!=TopAbs_FACE) {
542 if (!mySplitFaces.HasImage(aS)) {
549 const TopTools_ListOfShape& aLF=mySplitFaces.Image(aF);
551 for (; aIt.More(); aIt.Next()) {
552 aFSp=TopoDS::Face(aIt.Value());
553 if (!mySameDomainShapes.Contains(aFSp)) {
557 const TopoDS_Shape& aSx=mySameDomainShapes.FindFromKey(aFSp);
558 aFSD=TopoDS::Face(aSx);
559 iSense=GEOMAlgo_Tools3D::Sense(aFSp, aFSD);
566 if (!myImages.HasImage(aF)) {
567 //modified by NIZNHY-PKV Wed Oct 27 14:41:34 2010f
568 aNbLFx=aLFx.Extent();
570 const TopoDS_Shape& aFx=aLFx.First();
571 if (aF.IsSame(aFx)) {
575 //modified by NIZNHY-PKV Wed Oct 27 14:41:36 2010t
576 myImages.Bind(aF, aLFx);
580 //=======================================================================
581 // function: FillInternalVertices
583 //=======================================================================
584 void GEOMAlgo_Builder::FillInternalVertices()
586 const NMTDS_ShapesDataStructure& aDS=*myPaveFiller->DS();
587 NMTTools_PaveFiller* pPF=myPaveFiller;
588 NMTDS_InterfPool* pIP=pPF->IP();
589 IntTools_Context& aCtx= pPF->ChangeContext();
591 BOPTools_CArray1OfSSInterference& aFFs=pIP->SSInterferences();
592 BOPTools_CArray1OfVSInterference& aVFs=pIP->VSInterferences();
593 BOPTools_CArray1OfESInterference& aEFs=pIP->ESInterferences();
594 const NMTTools_IndexedDataMapOfIndexedMapOfInteger& aMAV=pPF->AloneVertices();
596 Standard_Boolean bHasImage;
597 Standard_Integer i, j, nF, aNbS, nV, nVSD, n1, n2, iFlag;
598 Standard_Integer aNbVFs, aNbAVF, aNbEFs, aNbVC, aNbE, aNbV;
599 Standard_Real aU1, aU2, aTol;
600 NMTTools_IndexedDataMapOfIndexedMapOfInteger aMFMV;
601 TopTools_MapOfShape aMFence;
602 TopTools_ListIteratorOfListOfShape aIt, aItV;
605 // 1. Collect face-vertex candidates [aMFMV]
608 aNbVFs=aVFs.Extent();
609 for (i=1; i<=aNbVFs; ++i) {
610 const BOPTools_VSInterference& aVS=aVFs(i);
614 if (aDS.Shape(n1).ShapeType()==TopAbs_FACE) {
618 nVSD=pPF->FindSDVertex(nV);
623 UpdateCandidates(nF, nV, aMFMV);
627 aNbEFs=aEFs.Extent();
628 for (i=1; i<=aNbEFs; ++i) {
629 const BOPTools_ESInterference& aEF=aEFs(i);
635 const TopoDS_Shape& aSnew=aDS.Shape(nV);
636 if (aSnew.ShapeType()!=TopAbs_VERTEX) {
640 nF=(aDS.Shape(n1).ShapeType()==TopAbs_FACE) ? n1 : n2;
641 nVSD=pPF->FindSDVertex(nV);
645 UpdateCandidates(nF, nV, aMFMV);
648 aNbS=aDS.NumberOfShapesOfTheObject();
649 for (nF=1; nF<=aNbS; ++nF) {
650 const TopoDS_Shape& aF=aDS.Shape(nF);
652 if (aF.ShapeType()!=TopAbs_FACE) {
655 if (!aMFence.Add(aF)) {
659 const TopoDS_Face& aFF=TopoDS::Face(aF);
660 aTol=BRep_Tool::Tolerance(aFF);
663 if (aMAV.Contains(nF)) {
664 const TColStd_IndexedMapOfInteger& aMAVF=aMAV.FindFromKey(nF);
665 aNbAVF=aMAVF.Extent();
666 for (j=1; j<=aNbAVF; ++j) {
668 nVSD=pPF->FindSDVertex(nV);
673 UpdateCandidates(nF, nV, aMFMV);
677 // 1.4 Internal vertices of the face nF
678 BooleanOperations_OnceExplorer aExp(aDS);
679 aExp.Init(nF, TopAbs_VERTEX);
680 for (; aExp.More(); aExp.Next()) {
682 const TopoDS_Shape& aV=aDS.Shape(nV);
683 if (aV.Orientation()==TopAbs_INTERNAL) {
684 nVSD=pPF->FindSDVertex(nV);
689 UpdateCandidates(nF, nV, aMFMV);
693 // 2. Process face nF
694 if (!aMFMV.Contains(nF)) {
698 const TColStd_IndexedMapOfInteger& aMVC=aMFMV.FindFromKey(nF);
704 // 2.1 Refine candidates
705 TopTools_IndexedDataMapOfShapeListOfShape aMVE;
706 TopTools_ListOfShape aLV;
708 bHasImage=myImages.HasImage(aF);
710 const TopTools_ListOfShape& aLFx=myImages.Image(aF);
711 aIt.Initialize(aLFx);
712 for (; aIt.More(); aIt.Next()) {
713 const TopoDS_Shape& aFx=aIt.Value();
714 TopExp::MapShapesAndAncestors(aFx, TopAbs_VERTEX, TopAbs_EDGE, aMVE);
718 Standard_Boolean bFaceToProcess;
720 TopExp::MapShapesAndAncestors(aF, TopAbs_VERTEX, TopAbs_EDGE, aMVE);
721 bFaceToProcess=Standard_False;
722 for (j=1; j<=aNbVC; ++j) {
724 const TopoDS_Shape& aV=aDS.Shape(nV);
725 if (!aMVE.Contains(aV)) {
726 bFaceToProcess=!bFaceToProcess;
730 if (!bFaceToProcess) {
735 for (j=1; j<=aNbVC; ++j) {
737 const TopoDS_Shape& aV=aDS.Shape(nV);
738 if (aMVE.Contains(aV)) {
739 const TopTools_ListOfShape& aLE=aMVE.FindFromKey(aV);
750 // 3. Try to put vertices into the face(s)
751 aItV.Initialize(aLV);
752 for (; aItV.More(); aItV.Next()) {
753 TopoDS_Vertex aV=TopoDS::Vertex(aItV.Value());
754 aV.Orientation(TopAbs_INTERNAL);
756 bHasImage=myImages.HasImage(aF);
758 const TopTools_ListOfShape& aLFx=myImages.Image(aF);
759 aIt.Initialize(aLFx);
760 for (; aIt.More(); aIt.Next()) {
761 TopoDS_Face aFx=TopoDS::Face(aIt.Value());
763 IntTools_FClass2d& aClsf=aCtx.FClass2d(aFx);
764 aClsf.Init(aFx, aTol);
766 iFlag=aCtx.ComputeVS (aV, aFx, aU1, aU2);
774 const TopoDS_Face& aFx=TopoDS::Face(aF);
776 IntTools_FClass2d& aClsf=aCtx.FClass2d(aFx);
777 aClsf.Init(aFx, aTol);
779 iFlag=aCtx.ComputeVS (aV, aFx, aU1, aU2);
783 GEOMAlgo_Tools3D::CopyFace(aFx, aFz);
785 myImages.Bind(aF, aFz);
788 }// for (; aItV.More(); aItV.Next()) {
790 }// for (nF=1; nF<=aNb; ++nF) {
792 //=======================================================================
793 // function: UpdateCandidates
795 //=======================================================================
796 void UpdateCandidates(const Standard_Integer theNF,
797 const Standard_Integer theNV,
798 NMTTools_IndexedDataMapOfIndexedMapOfInteger& theMFMV)
800 if (theMFMV.Contains(theNF)) {
801 TColStd_IndexedMapOfInteger& aMV=theMFMV.ChangeFromKey(theNF);
805 TColStd_IndexedMapOfInteger aMV;
807 theMFMV.Add(theNF, aMV);
815 TopTools_ListIteratorOfListOfShape aItx;
817 aBBx.MakeCompound(aCx);
819 aItx.Initialize(aSE);
820 for (; aItx.More(); aItx.Next()) {
821 TopoDS_Shape& aEx=aItx.Value();