Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:52

0001 // Created on: 1993-10-11
0002 // Created by: Christophe MARION
0003 // Copyright (c) 1993-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_PolyHLRToShape_HeaderFile
0018 #define _HLRBRep_PolyHLRToShape_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <HLRBRep_ListOfBPnt2D.hxx>
0025 #include <TopoDS_Shape.hxx>
0026 #include <Standard_Integer.hxx>
0027 class HLRBRep_PolyAlgo;
0028 class TopoDS_Shape;
0029 
0030 
0031 //! A framework for filtering the computation
0032 //! results of an HLRBRep_Algo algorithm by extraction.
0033 //! From the results calculated by the algorithm on
0034 //! a shape, a filter returns the type of edge you
0035 //! want to identify. You can choose any of the following types of output:
0036 //! -   visible sharp edges
0037 //! -   hidden sharp edges
0038 //! -   visible smooth edges
0039 //! -   hidden smooth edges
0040 //! -   visible sewn edges
0041 //! -   hidden sewn edges
0042 //! -   visible outline edges
0043 //! -   hidden outline edges.
0044 //! -   visible isoparameters and
0045 //! -   hidden isoparameters.
0046 //! Sharp edges present a C0 continuity (non G1).
0047 //! Smooth edges present a G1 continuity (non G2).
0048 //! Sewn edges present a C2 continuity.
0049 //! The result is composed of 2D edges in the
0050 //! projection plane of the view which the
0051 //! algorithm has worked with. These 2D edges
0052 //! are not included in the data structure of the visualized shape.
0053 //! In order to obtain a complete image, you must
0054 //! combine the shapes given by each of the chosen filters.
0055 //! The construction of the shape does not call a
0056 //! new computation of the algorithm, but only
0057 //! reads its internal results.
0058 class HLRBRep_PolyHLRToShape 
0059 {
0060 public:
0061 
0062   DEFINE_STANDARD_ALLOC
0063 
0064   
0065   //! Constructs a framework for filtering the results
0066   //! of the HLRBRep_Algo algorithm, A.
0067   //! Use the extraction filters to obtain the results you want for A.
0068   Standard_EXPORT HLRBRep_PolyHLRToShape();
0069   
0070   Standard_EXPORT void Update (const Handle(HLRBRep_PolyAlgo)& A);
0071   
0072     void Show();
0073   
0074     void Hide();
0075   
0076     TopoDS_Shape VCompound();
0077   
0078     TopoDS_Shape VCompound (const TopoDS_Shape& S);
0079   
0080   //! Sets the extraction filter for visible smooth edges.
0081     TopoDS_Shape Rg1LineVCompound();
0082   
0083     TopoDS_Shape Rg1LineVCompound (const TopoDS_Shape& S);
0084   
0085   //! Sets the extraction filter for visible sewn edges.
0086     TopoDS_Shape RgNLineVCompound();
0087   
0088     TopoDS_Shape RgNLineVCompound (const TopoDS_Shape& S);
0089   
0090     TopoDS_Shape OutLineVCompound();
0091   
0092   //! Sets the extraction filter for visible outlines.
0093     TopoDS_Shape OutLineVCompound (const TopoDS_Shape& S);
0094   
0095     TopoDS_Shape HCompound();
0096   
0097     TopoDS_Shape HCompound (const TopoDS_Shape& S);
0098   
0099     TopoDS_Shape Rg1LineHCompound();
0100   
0101   //! Sets the extraction filter for hidden smooth edges.
0102     TopoDS_Shape Rg1LineHCompound (const TopoDS_Shape& S);
0103   
0104     TopoDS_Shape RgNLineHCompound();
0105   
0106   //! Sets the extraction filter for hidden sewn edges.
0107     TopoDS_Shape RgNLineHCompound (const TopoDS_Shape& S);
0108   
0109     TopoDS_Shape OutLineHCompound();
0110   
0111   //! Sets the extraction filter for hidden outlines.
0112   //! Hidden outlines occur, for instance, in tori. In
0113   //! this case, the inner outlines of the torus seen on its side are hidden.
0114     TopoDS_Shape OutLineHCompound (const TopoDS_Shape& S);
0115 
0116 
0117 
0118 
0119 protected:
0120 
0121 
0122 
0123 
0124 
0125 private:
0126 
0127   
0128   Standard_EXPORT TopoDS_Shape InternalCompound (const Standard_Integer typ, const Standard_Boolean visible, const TopoDS_Shape& S);
0129 
0130 
0131   Handle(HLRBRep_PolyAlgo) myAlgo;
0132   HLRBRep_ListOfBPnt2D myBiPntVis;
0133   HLRBRep_ListOfBPnt2D myBiPntHid;
0134   Standard_Boolean myHideMode;
0135 
0136 
0137 };
0138 
0139 
0140 #include <HLRBRep_PolyHLRToShape.lxx>
0141 
0142 
0143 
0144 
0145 
0146 #endif // _HLRBRep_PolyHLRToShape_HeaderFile