1 // Created on: 1997-04-17
2 // Created by: Christophe MARION
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 <BRep_Tool.hxx>
19 #include <HLRAlgo_EdgeStatus.hxx>
20 #include <HLRBRep_Curve.hxx>
21 #include <HLRBRep_EdgeData.hxx>
22 #include <TopoDS_Edge.hxx>
24 //=======================================================================
27 //=======================================================================
28 HLRBRep_EdgeData::HLRBRep_EdgeData () :
31 { Selected(Standard_True); }
33 //=======================================================================
36 //=======================================================================
38 void HLRBRep_EdgeData::Set (const Standard_Boolean Rg1L,
39 const Standard_Boolean RgNL,
40 const TopoDS_Edge& EG,
41 const Standard_Integer V1,
42 const Standard_Integer V2,
43 const Standard_Boolean Out1,
44 const Standard_Boolean Out2,
45 const Standard_Boolean Cut1,
46 const Standard_Boolean Cut2,
47 const Standard_Real Start,
48 const Standard_ShortReal TolStart,
49 const Standard_Real End,
50 const Standard_ShortReal TolEnd)
55 ChangeGeometry().Curve(EG);
56 myTolerance = (Standard_ShortReal)(BRep_Tool::Tolerance(EG));
64 (Start,(Standard_ShortReal)(ChangeGeometry().Curve().Resolution
65 ((Standard_Real)TolStart)),
66 End ,(Standard_ShortReal)(ChangeGeometry().Curve().Resolution
67 ((Standard_Real)TolEnd )));
70 //=======================================================================
71 //function : UpdateMinMax
73 //=======================================================================
75 void HLRBRep_EdgeData::UpdateMinMax (const Standard_Address TotMinMax)
77 myMinMax[ 0] = ((Standard_Integer*)TotMinMax)[ 0];
78 myMinMax[ 1] = ((Standard_Integer*)TotMinMax)[ 1];
79 myMinMax[ 2] = ((Standard_Integer*)TotMinMax)[ 2];
80 myMinMax[ 3] = ((Standard_Integer*)TotMinMax)[ 3];
81 myMinMax[ 4] = ((Standard_Integer*)TotMinMax)[ 4];
82 myMinMax[ 5] = ((Standard_Integer*)TotMinMax)[ 5];
83 myMinMax[ 6] = ((Standard_Integer*)TotMinMax)[ 6];
84 myMinMax[ 7] = ((Standard_Integer*)TotMinMax)[ 7];
85 myMinMax[ 8] = ((Standard_Integer*)TotMinMax)[ 8];
86 myMinMax[ 9] = ((Standard_Integer*)TotMinMax)[ 9];
87 myMinMax[10] = ((Standard_Integer*)TotMinMax)[10];
88 myMinMax[11] = ((Standard_Integer*)TotMinMax)[11];
89 myMinMax[12] = ((Standard_Integer*)TotMinMax)[12];
90 myMinMax[13] = ((Standard_Integer*)TotMinMax)[13];
91 myMinMax[14] = ((Standard_Integer*)TotMinMax)[14];
92 myMinMax[15] = ((Standard_Integer*)TotMinMax)[15];