Back to home page

EIC code displayed by LXR

 
 

    


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

0001 // Created on: 1994-12-22
0002 // Created by: Remi LEQUETTE
0003 // Copyright (c) 1994-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 _BRepTools_Quilt_HeaderFile
0018 #define _BRepTools_Quilt_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <TopTools_IndexedDataMapOfShapeShape.hxx>
0024 class TopoDS_Edge;
0025 class TopoDS_Vertex;
0026 class TopoDS_Shape;
0027 
0028 
0029 //! A Tool to glue faces at common edges and reconstruct shells.
0030 //!
0031 //! The user designate pairs of common edges using the method Bind.
0032 //! One edge is designated as the edge to use in place of the other one
0033 //! (they are supposed to be geometrically confused, but this not checked).
0034 //! They can be of opposite directions, this is specified by the orientations.
0035 //!
0036 //! The user can add shapes with the Add method, all the faces are registered and copies of faces
0037 //! and edges are made to glue at the bound edges.
0038 //!
0039 //! The user can call the Shells methods to compute a compound of shells from the current set of faces.
0040 //!
0041 //! If no binding is made this class can be used to make shell from faces already sharing their edges.
0042 class BRepTools_Quilt 
0043 {
0044 public:
0045 
0046   DEFINE_STANDARD_ALLOC
0047 
0048   
0049   Standard_EXPORT BRepTools_Quilt();
0050   
0051   //! Binds <Enew> to   be  the  new edge  instead   of
0052   //! <Eold>.
0053   //!
0054   //! The faces  of  the added  shape containing  <Eold>
0055   //! will be copied to substitute <Eold> by <Enew>.
0056   //!
0057   //! The vertices  of   <Eold> will   be bound to   the
0058   //! vertices of <Enew> with the same orientation.
0059   //!
0060   //! If <Eold>  and <Enew>  have different orientations
0061   //! the curves are considered  to be opposite  and the
0062   //! pcurves of <Eold>  will be copied  and reversed in
0063   //! the new faces.
0064   //!
0065   //! <Eold> must belong to the next added shape, <Enew> must belong
0066   //! to a Shape added before.
0067   Standard_EXPORT void Bind (const TopoDS_Edge& Eold, const TopoDS_Edge& Enew);
0068   
0069   //! Binds <VNew> to be a new vertex instead of <Vold>.
0070   //!
0071   //! The faces  of  the added  shape containing  <Vold>
0072   //! will be copied to substitute <Vold> by <Vnew>.
0073   Standard_EXPORT void Bind (const TopoDS_Vertex& Vold, const TopoDS_Vertex& Vnew);
0074   
0075   //! Add   the faces of  <S>  to  the Quilt,  the faces
0076   //! containing bounded edges are copied.
0077   Standard_EXPORT void Add (const TopoDS_Shape& S);
0078   
0079   //! Returns   True if <S> has   been  copied (<S> is a
0080   //! vertex, an edge or a face)
0081   Standard_EXPORT Standard_Boolean IsCopied (const TopoDS_Shape& S) const;
0082   
0083   //! Returns the shape substituted to <S> in the Quilt.
0084   Standard_EXPORT const TopoDS_Shape& Copy (const TopoDS_Shape& S) const;
0085   
0086   //! Returns a Compound of shells made from the current
0087   //! set of faces. The shells will be flagged as closed
0088   //! or not closed.
0089   Standard_EXPORT TopoDS_Shape Shells() const;
0090 
0091 
0092 
0093 
0094 protected:
0095 
0096 
0097 
0098 
0099 
0100 private:
0101 
0102 
0103 
0104   TopTools_IndexedDataMapOfShapeShape myBounds;
0105   Standard_Boolean hasCopy;
0106 
0107 
0108 };
0109 
0110 
0111 
0112 
0113 
0114 
0115 
0116 #endif // _BRepTools_Quilt_HeaderFile