Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-22 08:29:36

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