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 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 _HLRAlgo_HeaderFile 18 #define _HLRAlgo_HeaderFile 19 20 #include <HLRAlgo_WiresBlock.hxx> 21 22 //! In order to have the precision required in 23 //! industrial design, drawings need to offer the 24 //! possibility of removing lines, which are hidden 25 //! in a given projection. To do this, the Hidden 26 //! Line Removal component provides two 27 //! algorithms: HLRBRep_Algo and HLRBRep_PolyAlgo. 28 //! These algorithms remove or indicate lines 29 //! hidden by surfaces. For a given projection, they 30 //! calculate a set of lines characteristic of the 31 //! object being represented. They are also used 32 //! in conjunction with extraction utilities, which 33 //! reconstruct a new, simplified shape from a 34 //! selection of calculation results. This new shape 35 //! is made up of edges, which represent the lines 36 //! of the visualized shape in a plane. This plane is the projection plane. 37 //! HLRBRep_Algo takes into account the shape 38 //! itself. HLRBRep_PolyAlgo works with a 39 //! polyhedral simplification of the shape. When 40 //! you use HLRBRep_Algo, you obtain an exact 41 //! result, whereas, when you use 42 //! HLRBRep_PolyAlgo, you reduce computation 43 //! time but obtain polygonal segments. 44 class HLRAlgo 45 { 46 public: 47 48 DEFINE_STANDARD_ALLOC 49 50 //! Iterator on the visible or hidden parts of an 51 //! EdgeStatus. 52 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]); 53 54 Standard_EXPORT static void EnlargeMinMax (const Standard_Real tol, Standard_Real Min[16], Standard_Real Max[16]); 55 56 Standard_EXPORT static void InitMinMax (const Standard_Real Big, Standard_Real Min[16], Standard_Real Max[16]); 57 58 Standard_EXPORT static void EncodeMinMax (HLRAlgo_EdgesBlock::MinMaxIndices& Min, HLRAlgo_EdgesBlock::MinMaxIndices& Max, HLRAlgo_EdgesBlock::MinMaxIndices& MinMax); 59 60 Standard_EXPORT static Standard_Real SizeBox (HLRAlgo_EdgesBlock::MinMaxIndices& Min, HLRAlgo_EdgesBlock::MinMaxIndices& Max); 61 62 Standard_EXPORT static void DecodeMinMax (const HLRAlgo_EdgesBlock::MinMaxIndices& MinMax, HLRAlgo_EdgesBlock::MinMaxIndices& Min, HLRAlgo_EdgesBlock::MinMaxIndices& Max); 63 CopyMinMax(HLRAlgo_EdgesBlock::MinMaxIndices & IMin,HLRAlgo_EdgesBlock::MinMaxIndices & IMax,HLRAlgo_EdgesBlock::MinMaxIndices & OMin,HLRAlgo_EdgesBlock::MinMaxIndices & OMax)64 static void CopyMinMax (HLRAlgo_EdgesBlock::MinMaxIndices& IMin, HLRAlgo_EdgesBlock::MinMaxIndices& IMax, HLRAlgo_EdgesBlock::MinMaxIndices& OMin, HLRAlgo_EdgesBlock::MinMaxIndices& OMax) 65 { 66 OMin = IMin; 67 OMax = IMax; 68 } 69 70 Standard_EXPORT static void AddMinMax (HLRAlgo_EdgesBlock::MinMaxIndices& IMin, HLRAlgo_EdgesBlock::MinMaxIndices& IMax, HLRAlgo_EdgesBlock::MinMaxIndices& OMin, HLRAlgo_EdgesBlock::MinMaxIndices& OMax); 71 72 }; 73 74 #endif // _HLRAlgo_HeaderFile 75