0031682: Visualization - Prs3d_ShadingAspect::SetTransparency() has no effect with...
[occt.git] / src / TopOpeBRepDS / TopOpeBRepDS_FilterEdgeInterferences.cxx
CommitLineData
b311480e 1// Created on: 1997-04-21
2// Created by: Prestataire Mary FABIEN
3// Copyright (c) 1997-1999 Matra Datavision
973c2be1 4// Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 5//
973c2be1 6// This file is part of Open CASCADE Technology software library.
b311480e 7//
d5f74e42 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
973c2be1 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.
b311480e 13//
973c2be1 14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
7fd59977 16
42cf5bc1 17
7fd59977 18#include <TopoDS_Shape.hxx>
42cf5bc1 19#include <TopOpeBRepDS_DataStructure.hxx>
20#include <TopOpeBRepDS_define.hxx>
21#include <TopOpeBRepDS_Filter.hxx>
22#include <TopOpeBRepDS_HDataStructure.hxx>
7fd59977 23#include <TopOpeBRepDS_Interference.hxx>
7fd59977 24#include <TopOpeBRepDS_ListIteratorOfListOfInterference.hxx>
42cf5bc1 25#include <TopOpeBRepDS_ListOfInterference.hxx>
7fd59977 26#include <TopOpeBRepDS_ProcessInterferencesTool.hxx>
7fd59977 27
7fd59977 28Standard_EXPORT Standard_Integer FUN_unkeepEinterferences(TopOpeBRepDS_ListOfInterference& LI,const TopOpeBRepDS_DataStructure& BDS,const Standard_Integer SIX);
29Standard_EXPORT void FUN_unkeepEsymetrictransitions(TopOpeBRepDS_ListOfInterference& LI,const TopOpeBRepDS_DataStructure& BDS,const Standard_Integer SIX);
30Standard_EXPORT void FUN_orderFFsamedomain(TopOpeBRepDS_ListOfInterference& LI,const Handle(TopOpeBRepDS_HDataStructure)& BDS,const Standard_Integer SIX);
31Standard_EXPORT void FUN_orderSTATETRANS(TopOpeBRepDS_ListOfInterference& LI,const Handle(TopOpeBRepDS_HDataStructure)& BDS,const Standard_Integer SIX);
32Standard_EXPORT void FUN_resolveEUNKNOWN(TopOpeBRepDS_ListOfInterference& LI,TopOpeBRepDS_DataStructure& BDS,const Standard_Integer SIX);
33Standard_EXPORT void FUN_purgeDSonSE(const Handle(TopOpeBRepDS_HDataStructure)& HDS,const Standard_Integer EIX,TopOpeBRepDS_ListOfInterference& LI);
34
35//------------------------------------------------------
36static void FUN_FilterEdge
37//------------------------------------------------------
38(TopOpeBRepDS_ListOfInterference& LI,const Handle(TopOpeBRepDS_HDataStructure)& HDS,const Standard_Integer SIX)
39{
40 TopOpeBRepDS_DataStructure& BDS = HDS->ChangeDS();
7fd59977 41
42 FUN_orderFFsamedomain(LI,HDS,SIX);
43 FUN_orderSTATETRANS(LI,HDS,SIX);
44 FUN_unkeepEinterferences(LI,BDS,SIX);
45 FUN_reducedoublons(LI,BDS,SIX);
7fd59977 46}
47
48//=======================================================================
49//function : ProcessEdgeInterferences
50//purpose : Filter
51//=======================================================================
52
53void TopOpeBRepDS_Filter::ProcessEdgeInterferences
54(const Standard_Integer SIX)
55{
56 TopOpeBRepDS_DataStructure& BDS = myHDS->ChangeDS();
7fd59977 57// BDS.Shape(SIX);
58 TopOpeBRepDS_ListOfInterference& LI = BDS.ChangeShapeInterferences(SIX);
59 TopOpeBRepDS_ListOfInterference lw, lE, lF, lUU, lall; lall.Assign(LI);
60
61 // xpu : 270398 :
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)
536a3cb8 66 ::FUN_selectTRAUNKinterference(lall,lUU);
7fd59977 67 FUN_resolveEUNKNOWN(lUU,BDS,SIX);
68 lw.Append(lall);
69 lw.Append(lUU);
536a3cb8 70 ::FUN_selectTRASHAinterference(lw,TopAbs_FACE,lF);
71 ::FUN_selectTRASHAinterference(lw,TopAbs_EDGE,lE);
7fd59977 72 ::FUN_FilterEdge(lF,myHDS,SIX);
7fd59977 73// ::FUN_unkeepEsymetrictransitions(lF,BDS,SIX);
7fd59977 74 ::FUN_FilterEdge(lE,myHDS,SIX);
75
76 LI.Clear();
77 LI.Append(lF);
78 LI.Append(lE);
7fd59977 79} //ProcessEdgeInterferences