Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1997-04-17
0002 // Created by: Christophe MARION
0003 // Copyright (c) 1997-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_InternalAlgo_HeaderFile
0018 #define _HLRBRep_InternalAlgo_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <HLRAlgo_Projector.hxx>
0024 #include <HLRBRep_SeqOfShapeBounds.hxx>
0025 #include <BRepTopAdaptor_MapOfShapeTool.hxx>
0026 #include <Standard_Transient.hxx>
0027 #include <Standard_Integer.hxx>
0028 class HLRBRep_Data;
0029 class HLRTopoBRep_OutLiner;
0030 class HLRBRep_ShapeBounds;
0031 
0032 
0033 class HLRBRep_InternalAlgo;
0034 DEFINE_STANDARD_HANDLE(HLRBRep_InternalAlgo, Standard_Transient)
0035 
0036 
0037 class HLRBRep_InternalAlgo : public Standard_Transient
0038 {
0039 
0040 public:
0041 
0042   
0043   Standard_EXPORT HLRBRep_InternalAlgo();
0044   
0045   Standard_EXPORT HLRBRep_InternalAlgo(const Handle(HLRBRep_InternalAlgo)& A);
0046   
0047   //! set the projector.
0048   Standard_EXPORT void Projector (const HLRAlgo_Projector& P);
0049   
0050   //! set the projector.
0051   Standard_EXPORT HLRAlgo_Projector& Projector();
0052   
0053   //! update the DataStructure.
0054   Standard_EXPORT void Update();
0055   
0056   //! add the shape <S>.
0057   Standard_EXPORT void Load (const Handle(HLRTopoBRep_OutLiner)& S, const Handle(Standard_Transient)& SData, const Standard_Integer nbIso = 0);
0058   
0059   //! add the shape <S>.
0060   Standard_EXPORT void Load (const Handle(HLRTopoBRep_OutLiner)& S, const Standard_Integer nbIso = 0);
0061   
0062   //! return the index of the Shape <S> and  return 0 if
0063   //! the Shape <S> is not found.
0064   Standard_EXPORT Standard_Integer Index (const Handle(HLRTopoBRep_OutLiner)& S) const;
0065   
0066   //! remove the Shape of Index <I>.
0067   Standard_EXPORT void Remove (const Standard_Integer I);
0068   
0069   //! Change the Shape Data of the Shape of index <I>.
0070   Standard_EXPORT void ShapeData (const Standard_Integer I, const Handle(Standard_Transient)& SData);
0071   
0072   Standard_EXPORT HLRBRep_SeqOfShapeBounds& SeqOfShapeBounds();
0073   
0074   Standard_EXPORT Standard_Integer NbShapes() const;
0075   
0076   Standard_EXPORT HLRBRep_ShapeBounds& ShapeBounds (const Standard_Integer I);
0077   
0078   //! init the status of the selected edges depending of
0079   //! the back faces of a closed shell.
0080   Standard_EXPORT void InitEdgeStatus();
0081   
0082   //! select all the DataStructure.
0083   Standard_EXPORT void Select();
0084   
0085   //! select  only   the Shape of index <I>.
0086   Standard_EXPORT void Select (const Standard_Integer I);
0087   
0088   //! select only the edges of the Shape <S>.
0089   Standard_EXPORT void SelectEdge (const Standard_Integer I);
0090   
0091   //! select only the faces of the Shape <S>.
0092   Standard_EXPORT void SelectFace (const Standard_Integer I);
0093   
0094   //! set to visible all the edges.
0095   Standard_EXPORT void ShowAll();
0096   
0097   //! set to visible all the edges of the Shape <S>.
0098   Standard_EXPORT void ShowAll (const Standard_Integer I);
0099   
0100   //! set to hide all the edges.
0101   Standard_EXPORT void HideAll();
0102   
0103   //! set to  hide all the  edges of the  Shape <S>.
0104   Standard_EXPORT void HideAll (const Standard_Integer I);
0105   
0106   //! own hiding  of all the shapes of the DataStructure
0107   //! without hiding by each other.
0108   Standard_EXPORT void PartialHide();
0109   
0110   //! hide all the DataStructure.
0111   Standard_EXPORT void Hide();
0112   
0113   //! hide the Shape <S> by itself.
0114   Standard_EXPORT void Hide (const Standard_Integer I);
0115   
0116   //! hide the Shape <S1> by the shape <S2>.
0117   Standard_EXPORT void Hide (const Standard_Integer I, const Standard_Integer J);
0118   
0119   Standard_EXPORT void Debug (const Standard_Boolean deb);
0120   
0121   Standard_EXPORT Standard_Boolean Debug() const;
0122   
0123   Standard_EXPORT Handle(HLRBRep_Data) DataStructure() const;
0124 
0125 
0126 
0127 
0128   DEFINE_STANDARD_RTTIEXT(HLRBRep_InternalAlgo,Standard_Transient)
0129 
0130 protected:
0131 
0132 
0133 
0134 
0135 private:
0136 
0137   
0138   //! first if <SideFace> own hiding  of the side faces.
0139   //! After hiding  of    the  selected  parts  of   the
0140   //! DataStructure.
0141   Standard_EXPORT void HideSelected (const Standard_Integer I, const Standard_Boolean SideFace);
0142 
0143   Handle(HLRBRep_Data) myDS;
0144   HLRAlgo_Projector myProj;
0145   HLRBRep_SeqOfShapeBounds myShapes;
0146   BRepTopAdaptor_MapOfShapeTool myMapOfShapeTool;
0147   Standard_Boolean myDebug;
0148 
0149 
0150 };
0151 
0152 
0153 
0154 
0155 
0156 
0157 
0158 #endif // _HLRBRep_InternalAlgo_HeaderFile