1 // Created on: 1994-12-22
2 // Created by: Remi LEQUETTE
3 // Copyright (c) 1994-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _BRepTools_Quilt_HeaderFile
18 #define _BRepTools_Quilt_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
24 #include <TopTools_IndexedDataMapOfShapeShape.hxx>
25 #include <Standard_Boolean.hxx>
26 class Standard_NoSuchObject;
32 //! A Tool to glue faces at common edges and
33 //! reconstruct shells.
35 //! The user designate pairs of common edges using the
36 //! method Bind. One edge is designated as the edge to
37 //! use in place of the other one (they are supposed
38 //! to be geometrically confused, but this not
39 //! checked). They can be of opposite directions, this
40 //! is specified by the orientations.
42 //! The user can add shapes with the Add method, all
43 //! the faces are registred and copies of faces and
44 //! edges are made to glue at the bound edges.
46 //! The user can call the Shells methods to compute a
47 //! compound of shells from the current set of faces.
49 //! If no binding is made this class can be used to
50 //! make shell from faces already sharing their edges.
58 Standard_EXPORT BRepTools_Quilt();
60 //! Binds <Enew> to be the new edge instead of
63 //! The faces of the added shape containing <Eold>
64 //! will be copied to substitute <Eold> by <Enew>.
66 //! The vertices of <Eold> will be bound to the
67 //! vertices of <Enew> with the same orientation.
69 //! If <Eold> and <Enew> have different orientations
70 //! the curves are considered to be opposite and the
71 //! pcurves of <Eold> will be copied and reversed in
74 //! <Eold> must belong to the next added shape, <Enew> must belong
75 //! to a Shape added before.
76 Standard_EXPORT void Bind (const TopoDS_Edge& Eold, const TopoDS_Edge& Enew);
78 //! Binds <VNew> to be a new vertex instead of <Vold>.
80 //! The faces of the added shape containing <Vold>
81 //! will be copied to substitute <Vold> by <Vnew>.
82 Standard_EXPORT void Bind (const TopoDS_Vertex& Vold, const TopoDS_Vertex& Vnew);
84 //! Add the faces of <S> to the Quilt, the faces
85 //! containing bounded edges are copied.
86 Standard_EXPORT void Add (const TopoDS_Shape& S);
88 //! Returns True if <S> has been copied (<S> is a
89 //! vertex, an edge or a face)
90 Standard_EXPORT Standard_Boolean IsCopied (const TopoDS_Shape& S) const;
92 //! Returns the shape substitued to <S> in the Quilt.
93 Standard_EXPORT const TopoDS_Shape& Copy (const TopoDS_Shape& S) const;
95 //! Returns a Compound of shells made from the current
96 //! set of faces. The shells will be flagged as closed
98 Standard_EXPORT TopoDS_Shape Shells() const;
113 TopTools_IndexedDataMapOfShapeShape myBounds;
114 Standard_Boolean hasCopy;
125 #endif // _BRepTools_Quilt_HeaderFile