b311480e |
1 | // Created on: 1997-04-17 |
2 | // Created by: Christophe MARION |
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 | |
18 | #include <HLRBRep_ShapeBounds.hxx> |
19 | #include <HLRTopoBRep_OutLiner.hxx> |
20 | #include <MMgt_TShared.hxx> |
7fd59977 |
21 | |
22 | //======================================================================= |
23 | //function : HLRBRep_ShapeBounds |
24 | //purpose : |
25 | //======================================================================= |
7fd59977 |
26 | HLRBRep_ShapeBounds:: |
27 | HLRBRep_ShapeBounds (const Handle(HLRTopoBRep_OutLiner)& S, |
28 | const Handle(MMgt_TShared)& SData, |
29 | const Standard_Integer nbIso, |
30 | const Standard_Integer V1, |
31 | const Standard_Integer V2, |
32 | const Standard_Integer E1, |
33 | const Standard_Integer E2, |
34 | const Standard_Integer F1, |
35 | const Standard_Integer F2) : |
36 | myShape(S), |
37 | myShapeData(SData), |
38 | myNbIso(nbIso), |
39 | myVertStart(V1),myVertEnd(V2), |
40 | myEdgeStart(E1),myEdgeEnd(E2), |
41 | myFaceStart(F1),myFaceEnd(F2) |
42 | {} |
43 | |
44 | //======================================================================= |
45 | //function : HLRBRep_ShapeBounds |
46 | //purpose : |
47 | //======================================================================= |
48 | |
49 | HLRBRep_ShapeBounds:: |
50 | HLRBRep_ShapeBounds (const Handle(HLRTopoBRep_OutLiner)& S, |
51 | const Standard_Integer nbIso, |
52 | const Standard_Integer V1, |
53 | const Standard_Integer V2, |
54 | const Standard_Integer E1, |
55 | const Standard_Integer E2, |
56 | const Standard_Integer F1, |
57 | const Standard_Integer F2) : |
58 | myShape(S), |
59 | myNbIso(nbIso), |
60 | myVertStart(V1),myVertEnd(V2), |
61 | myEdgeStart(E1),myEdgeEnd(E2), |
62 | myFaceStart(F1),myFaceEnd(F2) |
63 | {} |
64 | |
65 | //======================================================================= |
66 | //function : Translate |
67 | //purpose : |
68 | //======================================================================= |
69 | |
70 | void HLRBRep_ShapeBounds::Translate (const Standard_Integer NV, |
71 | const Standard_Integer NE, |
72 | const Standard_Integer NF) |
73 | { |
74 | myVertStart += NV; |
75 | myVertEnd += NV; |
76 | myEdgeStart += NE; |
77 | myEdgeEnd += NE; |
78 | myFaceStart += NF; |
79 | myFaceEnd += NF; |
80 | } |
81 | |
82 | //======================================================================= |
83 | //function : Sizes |
84 | //purpose : |
85 | //======================================================================= |
86 | |
87 | void HLRBRep_ShapeBounds::Sizes (Standard_Integer& NV, |
88 | Standard_Integer& NE, |
89 | Standard_Integer& NF) const |
90 | { |
91 | NV = myVertEnd + 1 - myVertStart; |
92 | NE = myEdgeEnd + 1 - myEdgeStart; |
93 | NF = myFaceEnd + 1 - myFaceStart; |
94 | } |
95 | |
96 | //======================================================================= |
97 | //function : Bounds |
98 | //purpose : |
99 | //======================================================================= |
100 | |
101 | void HLRBRep_ShapeBounds::Bounds (Standard_Integer& V1, |
102 | Standard_Integer& V2, |
103 | Standard_Integer& E1, |
104 | Standard_Integer& E2, |
105 | Standard_Integer& F1, |
106 | Standard_Integer& F2) const |
107 | { |
108 | V1 = myVertStart; |
109 | V2 = myVertEnd; |
110 | E1 = myEdgeStart; |
111 | E2 = myEdgeEnd; |
112 | F1 = myFaceStart; |
113 | F2 = myFaceEnd; |
114 | } |