Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:05:23

0001 // Created on: 1993-06-23
0002 // Created by: Jean Yves LEBEY
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 _TopOpeBRep_DSFiller_HeaderFile
0018 #define _TopOpeBRep_DSFiller_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <TopOpeBRep_ShapeIntersector.hxx>
0025 #include <TopOpeBRep_ShapeIntersector2d.hxx>
0026 #include <TopOpeBRep_FacesFiller.hxx>
0027 #include <TopOpeBRep_EdgesFiller.hxx>
0028 #include <TopOpeBRep_FaceEdgeFiller.hxx>
0029 #include <TopOpeBRepTool_PShapeClassifier.hxx>
0030 class TopoDS_Shape;
0031 class TopOpeBRepDS_HDataStructure;
0032 class TopoDS_Face;
0033 
0034 
0035 //! Provides class  methods  to  fill  a datastructure
0036 //! with  results  of intersections.
0037 //!
0038 //! 1.  Use  an    Intersector  to   find    pairs  of
0039 //! intersecting GeomShapes
0040 //!
0041 //! 2. For each  pair fill the DataStructure using the
0042 //! appropriate Filler.
0043 //!
0044 //! 3. Complete the  DataStructure to record shapes to
0045 //! rebuild (shells, wires )
0046 class TopOpeBRep_DSFiller 
0047 {
0048 public:
0049 
0050   DEFINE_STANDARD_ALLOC
0051 
0052   
0053   Standard_EXPORT TopOpeBRep_DSFiller();
0054   
0055   Standard_EXPORT ~TopOpeBRep_DSFiller();
0056   
0057   //! return field myPShapeClassifier.
0058   //! set field myPShapeClassifier.
0059   Standard_EXPORT TopOpeBRepTool_PShapeClassifier PShapeClassifier() const;
0060   
0061   //! Stores in <DS> the intersections of <S1> and <S2>.
0062   //! if orientFORWARD = True
0063   //! S FORWARD,REVERSED   --> FORWARD
0064   //! S EXTERNAL,INTERNAL --> EXTERNAL,INTERNAL
0065   Standard_EXPORT void Insert (const TopoDS_Shape& S1, const TopoDS_Shape& S2, const Handle(TopOpeBRepDS_HDataStructure)& HDS, const Standard_Boolean orientFORWARD = Standard_True);
0066   
0067   //! Stores in <DS> the intersections of <S1> and <S2>.
0068   //! if orientFORWARD = True
0069   //! S FORWAR,REVERSED   --> FORWARD
0070   //! S EXTERNAL,INTERNAL --> EXTERNAL,INTERNAL
0071   Standard_EXPORT void InsertIntersection (const TopoDS_Shape& S1, const TopoDS_Shape& S2, const Handle(TopOpeBRepDS_HDataStructure)& HDS, const Standard_Boolean orientFORWARD = Standard_True);
0072   
0073   Standard_EXPORT void Complete (const Handle(TopOpeBRepDS_HDataStructure)& HDS);
0074   
0075   //! Stores in <DS> the intersections of <S1> and <S2>.
0076   //! S1 et S2 contain only SameDomain Face
0077   Standard_EXPORT void Insert2d (const TopoDS_Shape& S1, const TopoDS_Shape& S2, const Handle(TopOpeBRepDS_HDataStructure)& HDS);
0078   
0079   //! S1, S2 set of tangent face
0080   //! lance les intersections 2d pour coder correctement
0081   //! les faces SameDomain.
0082   Standard_EXPORT void InsertIntersection2d (const TopoDS_Shape& S1, const TopoDS_Shape& S2, const Handle(TopOpeBRepDS_HDataStructure)& HDS);
0083   
0084   Standard_EXPORT Standard_Boolean IsMadeOf1d (const TopoDS_Shape& S) const;
0085   
0086   Standard_EXPORT Standard_Boolean IsContext1d (const TopoDS_Shape& S) const;
0087   
0088   //! Stores in <DS> the intersections of <S1> and <S2>.
0089   //! S1 and S2 are edges or wires.
0090   //! S1 edges have a 2d representation in face F1
0091   //! S2 edges have a 2d representation in face F2
0092   //! F1 is the face which surface is taken as reference
0093   //! for 2d description of S1 and S2 edges.
0094   //! if orientFORWARD = True
0095   //! S FORWARD,REVERSED  --> FORWARD
0096   //! S EXTERNAL,INTERNAL --> EXTERNAL,INTERNAL
0097   Standard_EXPORT void Insert1d (const TopoDS_Shape& S1, const TopoDS_Shape& S2, const TopoDS_Face& F1, const TopoDS_Face& F2, const Handle(TopOpeBRepDS_HDataStructure)& HDS, const Standard_Boolean orientFORWARD = Standard_False);
0098   
0099   Standard_EXPORT TopOpeBRep_ShapeIntersector& ChangeShapeIntersector();
0100   
0101   Standard_EXPORT TopOpeBRep_ShapeIntersector2d& ChangeShapeIntersector2d();
0102   
0103   Standard_EXPORT TopOpeBRep_FacesFiller& ChangeFacesFiller();
0104   
0105   Standard_EXPORT TopOpeBRep_EdgesFiller& ChangeEdgesFiller();
0106   
0107   Standard_EXPORT TopOpeBRep_FaceEdgeFiller& ChangeFaceEdgeFiller();
0108   
0109   Standard_EXPORT void GapFiller (const Handle(TopOpeBRepDS_HDataStructure)& HDS) const;
0110   
0111   //! Update   the  data      structure  with   relevant
0112   //! information deduced from the intersections.
0113   //!
0114   //! Shells containing an intersected face.
0115   //! Wires  containing an intersected edge.
0116   Standard_EXPORT void CompleteDS (const Handle(TopOpeBRepDS_HDataStructure)& HDS) const;
0117   
0118   Standard_EXPORT void Filter (const Handle(TopOpeBRepDS_HDataStructure)& HDS) const;
0119   
0120   Standard_EXPORT void Reducer (const Handle(TopOpeBRepDS_HDataStructure)& HDS) const;
0121   
0122   Standard_EXPORT void RemoveUnsharedGeometry (const Handle(TopOpeBRepDS_HDataStructure)& HDS);
0123   
0124   Standard_EXPORT void Checker (const Handle(TopOpeBRepDS_HDataStructure)& HDS) const;
0125   
0126   //! Update   the  data      structure  with   relevant
0127   //! information deduced from the intersections 2d.
0128   //!
0129   //! Shells containing an intersected face.
0130   //! Wires  containing an intersected edge.
0131   //!
0132   //! search for interference identity using edge connexity //NYI
0133   Standard_EXPORT void CompleteDS2d (const Handle(TopOpeBRepDS_HDataStructure)& HDS) const;
0134 
0135 
0136 
0137 
0138 protected:
0139 
0140 
0141 
0142 
0143 
0144 private:
0145 
0146   
0147   Standard_EXPORT Standard_Boolean CheckInsert (const TopoDS_Shape& S1, const TopoDS_Shape& S2) const;
0148   
0149   Standard_EXPORT Standard_Boolean ClearShapeSameDomain (const TopoDS_Shape& S1, const TopoDS_Shape& S2, const Handle(TopOpeBRepDS_HDataStructure)& HDS);
0150 
0151 
0152   TopOpeBRep_ShapeIntersector myShapeIntersector;
0153   TopOpeBRep_ShapeIntersector2d myShapeIntersector2d;
0154   TopOpeBRep_FacesFiller myFacesFiller;
0155   TopOpeBRep_EdgesFiller myEdgesFiller;
0156   TopOpeBRep_FaceEdgeFiller myFaceEdgeFiller;
0157   TopOpeBRepTool_PShapeClassifier myPShapeClassifier;
0158 
0159 
0160 };
0161 
0162 
0163 
0164 
0165 
0166 
0167 
0168 #endif // _TopOpeBRep_DSFiller_HeaderFile