1 // Created on: 1997-04-22
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 <TopOpeBRepDS_Filter.hxx>
19 #include <TopOpeBRepDS_HDataStructure.hxx>
20 #include <TopOpeBRepDS_Interference.hxx>
21 #include <TopOpeBRepDS_ListIteratorOfListOfInterference.hxx>
22 #include <TopOpeBRepDS_ListOfInterference.hxx>
23 #include <TopOpeBRepDS_ProcessInterferencesTool.hxx>
25 //=======================================================================
26 //function : ProcessCurveInterferences
28 //=======================================================================
30 void TopOpeBRepDS_Filter::ProcessCurveInterferences
31 (const Standard_Integer CIX)
33 TopOpeBRepDS_DataStructure& BDS = myHDS->ChangeDS();
34 TopOpeBRepDS_ListOfInterference& LI = BDS.ChangeCurveInterferences(CIX);
35 TopOpeBRepDS_ListIteratorOfListOfInterference it1(LI);
37 // process interferences of LI with VERTEX geometry
39 const Handle(TopOpeBRepDS_Interference)& I1 = it1.Value();
40 Standard_Integer G1 = I1->Geometry();
41 TopOpeBRepDS_Kind GT1 = I1->GeometryType();
42 TopAbs_Orientation O1 = I1->Transition().Orientation(TopAbs_IN);
44 if ( GT1 == TopOpeBRepDS_VERTEX ) {
46 TopOpeBRepDS_ListIteratorOfListOfInterference it2(it1);
49 while ( it2.More() ) {
50 const Handle(TopOpeBRepDS_Interference)& I2 = it2.Value();
51 Standard_Integer G2 = I2->Geometry();
52 TopOpeBRepDS_Kind GT2 = I2->GeometryType();
53 TopAbs_Orientation O2 = I2->Transition().Orientation(TopAbs_IN);
55 // Standard_Boolean remove = (GT2 == GT1) && (G2 == G1);
56 // xpu140898 : USA60111 : CPI(FORWARD,v10,C1) + CPIREV(REVERSED,v10,C1)
57 // do NOT delete CPIREV!!
58 Standard_Boolean remove = (GT2 == GT1) && (G2 == G1) && (O1 == O2);