42cf5bc1 |
1 | // Created on: 1993-10-11 |
2 | // Created by: Christophe MARION |
3 | // Copyright (c) 1993-1999 Matra Datavision |
4 | // Copyright (c) 1999-2014 OPEN CASCADE SAS |
5 | // |
6 | // This file is part of Open CASCADE Technology software library. |
7 | // |
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. |
13 | // |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
16 | |
17 | #ifndef _HLRBRep_PolyHLRToShape_HeaderFile |
18 | #define _HLRBRep_PolyHLRToShape_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <HLRBRep_ListOfBPnt2D.hxx> |
25 | #include <Standard_Boolean.hxx> |
26 | #include <TopoDS_Shape.hxx> |
27 | #include <Standard_Integer.hxx> |
28 | class HLRBRep_PolyAlgo; |
29 | class TopoDS_Shape; |
30 | |
31 | |
32 | //! A framework for filtering the computation |
33 | //! results of an HLRBRep_Algo algorithm by extraction. |
34 | //! From the results calculated by the algorithm on |
35 | //! a shape, a filter returns the type of edge you |
36 | //! want to identify. You can choose any of the following types of output: |
37 | //! - visible sharp edges |
38 | //! - hidden sharp edges |
39 | //! - visible smooth edges |
40 | //! - hidden smooth edges |
41 | //! - visible sewn edges |
42 | //! - hidden sewn edges |
43 | //! - visible outline edges |
44 | //! - hidden outline edges. |
45 | //! - visible isoparameters and |
46 | //! - hidden isoparameters. |
47 | //! Sharp edges present a C0 continuity (non G1). |
48 | //! Smooth edges present a G1 continuity (non G2). |
49 | //! Sewn edges present a C2 continuity. |
50 | //! The result is composed of 2D edges in the |
51 | //! projection plane of the view which the |
52 | //! algorithm has worked with. These 2D edges |
53 | //! are not included in the data structure of the visualized shape. |
54 | //! In order to obtain a complete image, you must |
55 | //! combine the shapes given by each of the chosen filters. |
56 | //! The construction of the shape does not call a |
57 | //! new computation of the algorithm, but only |
58 | //! reads its internal results. |
59 | class HLRBRep_PolyHLRToShape |
60 | { |
61 | public: |
62 | |
63 | DEFINE_STANDARD_ALLOC |
64 | |
65 | |
66 | //! Constructs a framework for filtering the results |
67 | //! of the HLRBRep_Algo algorithm, A. |
68 | //! Use the extraction filters to obtain the results you want for A. |
69 | Standard_EXPORT HLRBRep_PolyHLRToShape(); |
70 | |
71 | Standard_EXPORT void Update (const Handle(HLRBRep_PolyAlgo)& A); |
72 | |
73 | void Show(); |
74 | |
75 | void Hide(); |
76 | |
77 | TopoDS_Shape VCompound(); |
78 | |
79 | TopoDS_Shape VCompound (const TopoDS_Shape& S); |
80 | |
81 | //! Sets the extraction filter for visible smooth edges. |
82 | TopoDS_Shape Rg1LineVCompound(); |
83 | |
84 | TopoDS_Shape Rg1LineVCompound (const TopoDS_Shape& S); |
85 | |
86 | //! Sets the extraction filter for visible sewn edges. |
87 | TopoDS_Shape RgNLineVCompound(); |
88 | |
89 | TopoDS_Shape RgNLineVCompound (const TopoDS_Shape& S); |
90 | |
91 | TopoDS_Shape OutLineVCompound(); |
92 | |
93 | //! Sets the extraction filter for visible outlines. |
94 | TopoDS_Shape OutLineVCompound (const TopoDS_Shape& S); |
95 | |
96 | TopoDS_Shape HCompound(); |
97 | |
98 | TopoDS_Shape HCompound (const TopoDS_Shape& S); |
99 | |
100 | TopoDS_Shape Rg1LineHCompound(); |
101 | |
102 | //! Sets the extraction filter for hidden smooth edges. |
103 | TopoDS_Shape Rg1LineHCompound (const TopoDS_Shape& S); |
104 | |
105 | TopoDS_Shape RgNLineHCompound(); |
106 | |
107 | //! Sets the extraction filter for hidden sewn edges. |
108 | TopoDS_Shape RgNLineHCompound (const TopoDS_Shape& S); |
109 | |
110 | TopoDS_Shape OutLineHCompound(); |
111 | |
112 | //! Sets the extraction filter for hidden outlines. |
113 | //! Hidden outlines occur, for instance, in tori. In |
114 | //! this case, the inner outlines of the torus seen on its side are hidden. |
115 | TopoDS_Shape OutLineHCompound (const TopoDS_Shape& S); |
116 | |
117 | |
118 | |
119 | |
120 | protected: |
121 | |
122 | |
123 | |
124 | |
125 | |
126 | private: |
127 | |
128 | |
129 | Standard_EXPORT TopoDS_Shape InternalCompound (const Standard_Integer typ, const Standard_Boolean visible, const TopoDS_Shape& S); |
130 | |
131 | |
132 | Handle(HLRBRep_PolyAlgo) myAlgo; |
133 | HLRBRep_ListOfBPnt2D myBiPntVis; |
134 | HLRBRep_ListOfBPnt2D myBiPntHid; |
135 | Standard_Boolean myHideMode; |
136 | |
137 | |
138 | }; |
139 | |
140 | |
141 | #include <HLRBRep_PolyHLRToShape.lxx> |
142 | |
143 | |
144 | |
145 | |
146 | |
147 | #endif // _HLRBRep_PolyHLRToShape_HeaderFile |