0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / src / BRepTools / BRepTools_Quilt.hxx
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
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
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.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _BRepTools_Quilt_HeaderFile
18 #define _BRepTools_Quilt_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <TopTools_IndexedDataMapOfShapeShape.hxx>
25 #include <Standard_Boolean.hxx>
26 class Standard_NoSuchObject;
27 class TopoDS_Edge;
28 class TopoDS_Vertex;
29 class TopoDS_Shape;
30
31
32 //! A  Tool    to  glue faces  at  common    edges and
33 //! reconstruct shells.
34 //!
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.
41 //!
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.
45 //!
46 //! The user can call the Shells  methods to compute a
47 //! compound of shells from the current set of faces.
48 //!
49 //! If no  binding is made  this class can  be used to
50 //! make shell from faces already sharing their edges.
51 class BRepTools_Quilt 
52 {
53 public:
54
55   DEFINE_STANDARD_ALLOC
56
57   
58   Standard_EXPORT BRepTools_Quilt();
59   
60   //! Binds <Enew> to   be  the  new edge  instead   of
61   //! <Eold>.
62   //!
63   //! The faces  of  the added  shape containing  <Eold>
64   //! will be copied to substitute <Eold> by <Enew>.
65   //!
66   //! The vertices  of   <Eold> will   be bound to   the
67   //! vertices of <Enew> with the same orientation.
68   //!
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
72   //! the new faces.
73   //!
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);
77   
78   //! Binds <VNew> to be a new vertex instead of <Vold>.
79   //!
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);
83   
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);
87   
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;
91   
92   //! Returns the shape  substitued to <S> in the Quilt.
93   Standard_EXPORT const TopoDS_Shape& Copy (const TopoDS_Shape& S) const;
94   
95   //! Returns a Compound of shells made from the current
96   //! set of faces. The shells will be flagged as closed
97   //! or not closed.
98   Standard_EXPORT TopoDS_Shape Shells() const;
99
100
101
102
103 protected:
104
105
106
107
108
109 private:
110
111
112
113   TopTools_IndexedDataMapOfShapeShape myBounds;
114   Standard_Boolean hasCopy;
115
116
117 };
118
119
120
121
122
123
124
125 #endif // _BRepTools_Quilt_HeaderFile