1 // Created on: 1992-02-18
2 // Created by: Christophe MARION
3 // Copyright (c) 1992-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.
17 #ifndef _HLRAlgo_HeaderFile
18 #define _HLRAlgo_HeaderFile
20 #include <HLRAlgo_WiresBlock.hxx>
22 #include <Standard.hxx>
23 #include <Standard_DefineAlloc.hxx>
24 #include <Standard_Handle.hxx>
26 #include <Standard_Real.hxx>
28 class HLRAlgo_BiPoint;
29 class HLRAlgo_PolyShellData;
30 class HLRAlgo_PolyInternalData;
31 class HLRAlgo_PolyInternalSegment;
32 class HLRAlgo_PolyInternalNode;
33 class HLRAlgo_PolyData;
34 class HLRAlgo_PolyHidingData;
35 class HLRAlgo_TriangleData;
36 class HLRAlgo_PolyAlgo;
37 class HLRAlgo_EdgeStatus;
38 class HLRAlgo_Projector;
39 class HLRAlgo_Intersection;
40 class HLRAlgo_Coincidence;
41 class HLRAlgo_Interference;
42 class HLRAlgo_EdgesBlock;
43 class HLRAlgo_WiresBlock;
44 class HLRAlgo_EdgeIterator;
47 //! In order to have the precision required in
48 //! industrial design, drawings need to offer the
49 //! possibility of removing lines, which are hidden
50 //! in a given projection. To do this, the Hidden
51 //! Line Removal component provides two
52 //! algorithms: HLRBRep_Algo and HLRBRep_PolyAlgo.
53 //! These algorithms remove or indicate lines
54 //! hidden by surfaces. For a given projection, they
55 //! calculate a set of lines characteristic of the
56 //! object being represented. They are also used
57 //! in conjunction with extraction utilities, which
58 //! reconstruct a new, simplified shape from a
59 //! selection of calculation results. This new shape
60 //! is made up of edges, which represent the lines
61 //! of the visualized shape in a plane. This plane is the projection plane.
62 //! HLRBRep_Algo takes into account the shape
63 //! itself. HLRBRep_PolyAlgo works with a
64 //! polyhedral simplification of the shape. When
65 //! you use HLRBRep_Algo, you obtain an exact
66 //! result, whereas, when you use
67 //! HLRBRep_PolyAlgo, you reduce computation
68 //! time but obtain polygonal segments.
76 //! Iterator on the visible or hidden parts of an
78 Standard_EXPORT static void UpdateMinMax (const Standard_Real x, const Standard_Real y, const Standard_Real z, Standard_Real Min[16], Standard_Real Max[16]);
80 Standard_EXPORT static void EnlargeMinMax (const Standard_Real tol, Standard_Real Min[16], Standard_Real Max[16]);
82 Standard_EXPORT static void InitMinMax (const Standard_Real Big, Standard_Real Min[16], Standard_Real Max[16]);
84 Standard_EXPORT static void EncodeMinMax (HLRAlgo_EdgesBlock::MinMaxIndices& Min, HLRAlgo_EdgesBlock::MinMaxIndices& Max, HLRAlgo_EdgesBlock::MinMaxIndices& MinMax);
86 Standard_EXPORT static Standard_Real SizeBox (HLRAlgo_EdgesBlock::MinMaxIndices& Min, HLRAlgo_EdgesBlock::MinMaxIndices& Max);
88 Standard_EXPORT static void DecodeMinMax (const HLRAlgo_EdgesBlock::MinMaxIndices& MinMax, HLRAlgo_EdgesBlock::MinMaxIndices& Min, HLRAlgo_EdgesBlock::MinMaxIndices& Max);
90 static void CopyMinMax (HLRAlgo_EdgesBlock::MinMaxIndices& IMin, HLRAlgo_EdgesBlock::MinMaxIndices& IMax, HLRAlgo_EdgesBlock::MinMaxIndices& OMin, HLRAlgo_EdgesBlock::MinMaxIndices& OMax)
96 Standard_EXPORT static void AddMinMax (HLRAlgo_EdgesBlock::MinMaxIndices& IMin, HLRAlgo_EdgesBlock::MinMaxIndices& IMax, HLRAlgo_EdgesBlock::MinMaxIndices& OMin, HLRAlgo_EdgesBlock::MinMaxIndices& OMax);
112 friend class HLRAlgo_BiPoint;
113 friend class HLRAlgo_PolyShellData;
114 friend class HLRAlgo_PolyInternalData;
115 friend class HLRAlgo_PolyInternalSegment;
116 friend class HLRAlgo_PolyInternalNode;
117 friend class HLRAlgo_PolyData;
118 friend class HLRAlgo_PolyHidingData;
119 friend class HLRAlgo_TriangleData;
120 friend class HLRAlgo_PolyAlgo;
121 friend class HLRAlgo_EdgeStatus;
122 friend class HLRAlgo_Projector;
123 friend class HLRAlgo_Intersection;
124 friend class HLRAlgo_Coincidence;
125 friend class HLRAlgo_Interference;
126 friend class HLRAlgo_EdgesBlock;
127 friend class HLRAlgo_WiresBlock;
128 friend class HLRAlgo_EdgeIterator;
138 #endif // _HLRAlgo_HeaderFile