|
||||
File indexing completed on 2025-01-18 10:03:51
0001 // Created on: 1994-08-03 0002 // Created by: Christophe MARION 0003 // Copyright (c) 1994-1999 Matra Datavision 0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS 0005 // 0006 // This file is part of Open CASCADE Technology software library. 0007 // 0008 // This library is free software; you can redistribute it and/or modify it under 0009 // the terms of the GNU Lesser General Public License version 2.1 as published 0010 // by the Free Software Foundation, with special exception defined in the file 0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0012 // distribution for complete text of the license and disclaimer of any warranty. 0013 // 0014 // Alternatively, this file may be used under the terms of Open CASCADE 0015 // commercial license or contractual agreement. 0016 0017 #ifndef _HLRBRep_Algo_HeaderFile 0018 #define _HLRBRep_Algo_HeaderFile 0019 0020 #include <Standard.hxx> 0021 0022 #include <HLRBRep_InternalAlgo.hxx> 0023 #include <Standard_Integer.hxx> 0024 class TopoDS_Shape; 0025 class Standard_Transient; 0026 0027 0028 class HLRBRep_Algo; 0029 DEFINE_STANDARD_HANDLE(HLRBRep_Algo, HLRBRep_InternalAlgo) 0030 0031 //! Inherited from InternalAlgo to provide methods with Shape from TopoDS. 0032 //! A framework to compute a shape as seen in a projection plane. This is done by 0033 //! calculating the visible and the hidden parts of the shape. 0034 //! HLRBRep_Algo works with three types of entity: 0035 //! - shapes to be visualized 0036 //! - edges in these shapes (these edges are 0037 //! the basic entities which will be visualized or hidden), and 0038 //! - faces in these shapes which hide the edges. 0039 //! HLRBRep_Algo is based on the principle of comparing each edge of the shape to be 0040 //! visualized with each of its faces, and calculating the visible and the hidden parts of each edge. 0041 //! For a given projection, HLRBRep_Algo calculates a set of lines characteristic of the 0042 //! object being represented. It is also used in conjunction with the 0043 //! HLRBRep_HLRToShape extraction utilities, which reconstruct a new, simplified shape 0044 //! from a selection of calculation results. This new shape is made up of edges, which 0045 //! represent the shape visualized in the projection. 0046 //! HLRBRep_Algo takes the shape itself into account whereas HLRBRep_PolyAlgo 0047 //! works with a polyhedral simplification of the shape. When you use HLRBRep_Algo, you 0048 //! obtain an exact result, whereas, when you use HLRBRep_PolyAlgo, you reduce 0049 //! computation time but obtain polygonal segments. In the case of complicated 0050 //! shapes, HLRBRep_Algo may be time-consuming. 0051 //! An HLRBRep_Algo object provides a framework for: 0052 //! - defining the point of view 0053 //! - identifying the shape or shapes to be visualized 0054 //! - calculating the outlines 0055 //! - calculating the visible and hidden lines of the shape. 0056 //! Warning 0057 //! - Superimposed lines are not eliminated by this algorithm. 0058 //! - There must be no unfinished objects inside the shape you wish to visualize. 0059 //! - Points are not treated. 0060 //! - Note that this is not the sort of algorithm used in generating shading, which 0061 //! calculates the visible and hidden parts of each face in a shape to be visualized by 0062 //! comparing each face in the shape with every other face in the same shape. 0063 class HLRBRep_Algo : public HLRBRep_InternalAlgo 0064 { 0065 0066 public: 0067 0068 0069 //! Constructs an empty framework for the 0070 //! calculation of visible and hidden lines of a shape in a projection. 0071 //! Use the function: 0072 //! - Projector to define the point of view 0073 //! - Add to select the shape or shapes to be visualized 0074 //! - Update to compute the outlines of the shape, and 0075 //! - Hide to compute the visible and hidden lines of the shape. 0076 Standard_EXPORT HLRBRep_Algo(); 0077 0078 Standard_EXPORT HLRBRep_Algo(const Handle(HLRBRep_Algo)& A); 0079 0080 //! add the Shape <S>. 0081 Standard_EXPORT void Add (const TopoDS_Shape& S, const Handle(Standard_Transient)& SData, const Standard_Integer nbIso = 0); 0082 0083 //! Adds the shape S to this framework, and 0084 //! specifies the number of isoparameters nbiso desired in visualizing S. 0085 //! You may add as many shapes as you wish. Use the function Add once for each shape. 0086 Standard_EXPORT void Add (const TopoDS_Shape& S, const Standard_Integer nbIso = 0); 0087 0088 //! return the index of the Shape <S> and 0089 //! return 0 if the Shape <S> is not found. 0090 Standard_EXPORT Standard_Integer Index (const TopoDS_Shape& S); 0091 0092 //! nullify all the results of OutLiner from HLRTopoBRep. 0093 Standard_EXPORT void OutLinedShapeNullify(); 0094 0095 0096 0097 0098 DEFINE_STANDARD_RTTIEXT(HLRBRep_Algo,HLRBRep_InternalAlgo) 0099 0100 protected: 0101 0102 0103 0104 0105 private: 0106 0107 0108 0109 0110 }; 0111 0112 0113 0114 0115 0116 0117 0118 #endif // _HLRBRep_Algo_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |