1 // Created on: 1997-04-21
2 // Created by: Prestataire Mary FABIEN
3 // Copyright (c) 1997-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
18 #include <TopoDS_Shape.hxx>
19 #include <TopOpeBRepDS_DataStructure.hxx>
20 #include <TopOpeBRepDS_define.hxx>
21 #include <TopOpeBRepDS_Filter.hxx>
22 #include <TopOpeBRepDS_HDataStructure.hxx>
23 #include <TopOpeBRepDS_Interference.hxx>
24 #include <TopOpeBRepDS_ListIteratorOfListOfInterference.hxx>
25 #include <TopOpeBRepDS_ListOfInterference.hxx>
26 #include <TopOpeBRepDS_ProcessInterferencesTool.hxx>
28 Standard_EXPORT Standard_Integer FUN_unkeepEinterferences(TopOpeBRepDS_ListOfInterference& LI,const TopOpeBRepDS_DataStructure& BDS,const Standard_Integer SIX);
29 Standard_EXPORT void FUN_unkeepEsymetrictransitions(TopOpeBRepDS_ListOfInterference& LI,const TopOpeBRepDS_DataStructure& BDS,const Standard_Integer SIX);
30 Standard_EXPORT void FUN_orderFFsamedomain(TopOpeBRepDS_ListOfInterference& LI,const Handle(TopOpeBRepDS_HDataStructure)& BDS,const Standard_Integer SIX);
31 Standard_EXPORT void FUN_orderSTATETRANS(TopOpeBRepDS_ListOfInterference& LI,const Handle(TopOpeBRepDS_HDataStructure)& BDS,const Standard_Integer SIX);
32 Standard_EXPORT void FUN_resolveEUNKNOWN(TopOpeBRepDS_ListOfInterference& LI,TopOpeBRepDS_DataStructure& BDS,const Standard_Integer SIX);
33 Standard_EXPORT void FUN_purgeDSonSE(const Handle(TopOpeBRepDS_HDataStructure)& HDS,const Standard_Integer EIX,TopOpeBRepDS_ListOfInterference& LI);
35 //------------------------------------------------------
36 static void FUN_FilterEdge
37 //------------------------------------------------------
38 (TopOpeBRepDS_ListOfInterference& LI,const Handle(TopOpeBRepDS_HDataStructure)& HDS,const Standard_Integer SIX)
40 TopOpeBRepDS_DataStructure& BDS = HDS->ChangeDS();
42 FUN_orderFFsamedomain(LI,HDS,SIX);
43 FUN_orderSTATETRANS(LI,HDS,SIX);
44 FUN_unkeepEinterferences(LI,BDS,SIX);
45 FUN_reducedoublons(LI,BDS,SIX);
48 //=======================================================================
49 //function : ProcessEdgeInterferences
51 //=======================================================================
53 void TopOpeBRepDS_Filter::ProcessEdgeInterferences
54 (const Standard_Integer SIX)
56 TopOpeBRepDS_DataStructure& BDS = myHDS->ChangeDS();
58 TopOpeBRepDS_ListOfInterference& LI = BDS.ChangeShapeInterferences(SIX);
59 TopOpeBRepDS_ListOfInterference lw, lE, lF, lUU, lall; lall.Assign(LI);
62 // deleting faulty interferences attached to section edge EIX
63 // I = (T(Ftrasha),G,Ftrasha), Ftrasha sdm with FancestorofEIX
64 FUN_purgeDSonSE(myHDS,SIX,lall);
65 // xpu : 270398 (pro1260, edge 49,ftrasha 93)
66 ::FUN_selectTRAUNKinterference(lall,lUU);
67 FUN_resolveEUNKNOWN(lUU,BDS,SIX);
70 ::FUN_selectTRASHAinterference(lw,TopAbs_FACE,lF);
71 ::FUN_selectTRASHAinterference(lw,TopAbs_EDGE,lE);
72 ::FUN_FilterEdge(lF,myHDS,SIX);
73 // ::FUN_unkeepEsymetrictransitions(lF,BDS,SIX);
74 ::FUN_FilterEdge(lE,myHDS,SIX);
79 } //ProcessEdgeInterferences