Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:13

0001 // Created on: 1996-01-11
0002 // Created by: Jacques GOUSSARD
0003 // Copyright (c) 1996-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 _LocOpe_WiresOnShape_HeaderFile
0018 #define _LocOpe_WiresOnShape_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <TopoDS_Shape.hxx>
0024 #include <TopTools_IndexedDataMapOfShapeShape.hxx>
0025 #include <TopTools_MapOfShape.hxx>
0026 #include <TopTools_DataMapOfShapeShape.hxx>
0027 #include <Standard_Integer.hxx>
0028 #include <Standard_Transient.hxx>
0029 #include <TopTools_SequenceOfShape.hxx>
0030 
0031 class TopoDS_Wire;
0032 class TopoDS_Face;
0033 class TopoDS_Compound;
0034 class TopoDS_Edge;
0035 class TopoDS_Vertex;
0036 
0037 
0038 class LocOpe_WiresOnShape;
0039 DEFINE_STANDARD_HANDLE(LocOpe_WiresOnShape, Standard_Transient)
0040 
0041 
0042 class LocOpe_WiresOnShape : public Standard_Transient
0043 {
0044 
0045 public:
0046 
0047   
0048   Standard_EXPORT LocOpe_WiresOnShape(const TopoDS_Shape& S);
0049   
0050   Standard_EXPORT void Init (const TopoDS_Shape& S);
0051 
0052   //! Add splitting edges or wires for whole initial shape
0053   //! without additional specification edge->face, edge->edge
0054   //! This method puts edge on the corresponding faces from initial shape
0055   Standard_EXPORT Standard_Boolean Add(const TopTools_SequenceOfShape& theEdges);
0056   
0057   //! Set the flag of check internal intersections
0058   //! default value is True (to check)
0059     void SetCheckInterior (const Standard_Boolean ToCheckInterior);
0060   
0061   Standard_EXPORT void Bind (const TopoDS_Wire& W, const TopoDS_Face& F);
0062   
0063   Standard_EXPORT void Bind (const TopoDS_Compound& Comp, const TopoDS_Face& F);
0064   
0065   Standard_EXPORT void Bind (const TopoDS_Edge& E, const TopoDS_Face& F);
0066   
0067   Standard_EXPORT void Bind (const TopoDS_Edge& EfromW, const TopoDS_Edge& EonFace);
0068   
0069   Standard_EXPORT void BindAll();
0070   
0071     Standard_Boolean IsDone() const;
0072   
0073   Standard_EXPORT void InitEdgeIterator();
0074   
0075   Standard_EXPORT Standard_Boolean MoreEdge();
0076   
0077   Standard_EXPORT TopoDS_Edge Edge();
0078   
0079   //! Returns the face of the shape on which the current
0080   //! edge is projected.
0081   Standard_EXPORT TopoDS_Face OnFace();
0082   
0083   //! If the   current  edge is  projected  on  an edge,
0084   //! returns <Standard_True> and sets the value of <E>.
0085   //! Otherwise, returns <Standard_False>.
0086   Standard_EXPORT Standard_Boolean OnEdge (TopoDS_Edge& E);
0087   
0088   Standard_EXPORT void NextEdge();
0089   
0090   Standard_EXPORT Standard_Boolean OnVertex (const TopoDS_Vertex& Vwire, TopoDS_Vertex& Vshape);
0091   
0092   //! If the vertex <V> lies on  an edge of the original
0093   //! shape,  returns     <Standard_True> and   sets the
0094   //! concerned edge in  <E>,  and the parameter on  the
0095   //! edge in <P>.
0096   //! Else returns <Standard_False>.
0097   Standard_EXPORT Standard_Boolean OnEdge (const TopoDS_Vertex& V, TopoDS_Edge& E, Standard_Real& P);
0098   
0099   //! If the vertex <V> lies on  an edge of the original
0100   //! shape,  returns     <Standard_True> and   sets the
0101   //! concerned edge in  <E>,  and the parameter on  the
0102   //! edge in <P>.
0103   //! Else returns <Standard_False>.
0104   Standard_EXPORT Standard_Boolean OnEdge (const TopoDS_Vertex& V, const TopoDS_Edge& EdgeFrom, TopoDS_Edge& E, Standard_Real& P);
0105   
0106   //! tells is the face to be split by section or not
0107     Standard_Boolean IsFaceWithSection (const TopoDS_Shape& aFace) const;
0108 
0109 
0110 
0111 
0112   DEFINE_STANDARD_RTTIEXT(LocOpe_WiresOnShape,Standard_Transient)
0113 
0114 protected:
0115 
0116 
0117 
0118 
0119 private:
0120 
0121 
0122   TopoDS_Shape myShape;
0123   TopTools_IndexedDataMapOfShapeShape myMapEF;
0124   TopTools_MapOfShape myFacesWithSection;
0125   Standard_Boolean myCheckInterior;
0126   TopTools_DataMapOfShapeShape myMap;
0127   Standard_Boolean myDone;
0128   Standard_Integer myIndex;
0129 
0130 
0131 };
0132 
0133 
0134 #include <LocOpe_WiresOnShape.lxx>
0135 
0136 
0137 
0138 
0139 
0140 #endif // _LocOpe_WiresOnShape_HeaderFile