Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-07-24 09:16:03

0001 // Created on: 1996-08-30
0002 // Created by: Yves FRICAUD
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 _BRepOffset_Inter2d_HeaderFile
0018 #define _BRepOffset_Inter2d_HeaderFile
0019 
0020 #include <TopTools_IndexedMapOfShape.hxx>
0021 #include <TopTools_DataMapOfShapeShape.hxx>
0022 #include <TopTools_DataMapOfShapeListOfShape.hxx>
0023 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
0024 #include <Message_ProgressRange.hxx>
0025 
0026 class BRepAlgo_AsDes;
0027 class BRepAlgo_Image;
0028 class BRepOffset_Analyse;
0029 class BRepOffset_Offset;
0030 class TopoDS_Edge;
0031 class TopoDS_Face;
0032 
0033 //! Computes the intersections between edges on a face
0034 //! stores result is SD as AsDes from BRepOffset.
0035 class BRepOffset_Inter2d
0036 {
0037 public:
0038   DEFINE_STANDARD_ALLOC
0039 
0040   //! Computes the intersections between the edges stored
0041   //! is AsDes as descendants of <F> . Intersections is computed
0042   //! between two edges if one of them is bound in NewEdges.
0043   //! When all faces of the shape are treated the intersection
0044   //! vertices have to be fused using the FuseVertices method.
0045   //! theDMVV contains the vertices that should be fused
0046   Standard_EXPORT static void Compute(const Handle(BRepAlgo_AsDes)&              AsDes,
0047                                       const TopoDS_Face&                         F,
0048                                       const TopTools_IndexedMapOfShape&          NewEdges,
0049                                       const Standard_Real                        Tol,
0050                                       const TopTools_DataMapOfShapeListOfShape&  theEdgeIntEdges,
0051                                       TopTools_IndexedDataMapOfShapeListOfShape& theDMVV,
0052                                       const Message_ProgressRange&               theRange);
0053 
0054   //! Computes the intersection between the offset edges of the <FI>.
0055   //! All intersection vertices will be stored in AsDes2d.
0056   //! When all faces of the shape are treated the intersection vertices
0057   //! have to be fused using the FuseVertices method.
0058   //! theDMVV contains the vertices that should be fused.
0059   Standard_EXPORT static Standard_Boolean ConnexIntByInt(
0060     const TopoDS_Face&                         FI,
0061     BRepOffset_Offset&                         OFI,
0062     TopTools_DataMapOfShapeShape&              MES,
0063     const TopTools_DataMapOfShapeShape&        Build,
0064     const Handle(BRepAlgo_AsDes)&              theAsDes,
0065     const Handle(BRepAlgo_AsDes)&              AsDes2d,
0066     const Standard_Real                        Offset,
0067     const Standard_Real                        Tol,
0068     const BRepOffset_Analyse&                  Analyse,
0069     TopTools_IndexedMapOfShape&                FacesWithVerts,
0070     BRepAlgo_Image&                            theImageVV,
0071     TopTools_DataMapOfShapeListOfShape&        theEdgeIntEdges,
0072     TopTools_IndexedDataMapOfShapeListOfShape& theDMVV,
0073     const Message_ProgressRange&               theRange);
0074 
0075   //! Computes the intersection between the offset edges generated
0076   //! from vertices and stored into AsDes as descendants of the <FI>.
0077   //! All intersection vertices will be stored in AsDes2d.
0078   //! When all faces of the shape are treated the intersection vertices
0079   //! have to be fused using the FuseVertices method.
0080   //! theDMVV contains the vertices that should be fused.
0081   Standard_EXPORT static void ConnexIntByIntInVert(
0082     const TopoDS_Face&                         FI,
0083     BRepOffset_Offset&                         OFI,
0084     TopTools_DataMapOfShapeShape&              MES,
0085     const TopTools_DataMapOfShapeShape&        Build,
0086     const Handle(BRepAlgo_AsDes)&              AsDes,
0087     const Handle(BRepAlgo_AsDes)&              AsDes2d,
0088     const Standard_Real                        Tol,
0089     const BRepOffset_Analyse&                  Analyse,
0090     TopTools_IndexedDataMapOfShapeListOfShape& theDMVV,
0091     const Message_ProgressRange&               theRange);
0092 
0093   //! Fuses the chains of vertices in the theDMVV
0094   //! and updates AsDes by replacing the old vertices
0095   //! with the new ones.
0096   Standard_EXPORT static Standard_Boolean FuseVertices(
0097     const TopTools_IndexedDataMapOfShapeListOfShape& theDMVV,
0098     const Handle(BRepAlgo_AsDes)&                    theAsDes,
0099     BRepAlgo_Image&                                  theImageVV);
0100 
0101   //! extents the edge
0102   Standard_EXPORT static Standard_Boolean ExtentEdge(const TopoDS_Edge&  E,
0103                                                      TopoDS_Edge&        NE,
0104                                                      const Standard_Real theOffset);
0105 };
0106 
0107 #endif // _BRepOffset_Inter2d_HeaderFile