b311480e |
1 | -- Created on: 1998-09-16 |
2 | -- Created by: Roman LYGIN <rln@nnov.matra-dtv.fr> |
3 | -- Copyright (c) 1998-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
7 | -- |
d5f74e42 |
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 |
973c2be1 |
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. |
b311480e |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
b311480e |
16 | |
7fd59977 |
17 | -- Pavel DURANDIN <pdn@nnov.matra-dtv.fr> |
7fd59977 |
18 | |
19 | |
20 | class FreeBounds from ShapeFix |
21 | |
22 | ---Purpose: This class is intended to output free bounds of the shape |
23 | -- (free bounds are the wires consisting of edges referenced by the |
24 | -- only face). |
25 | -- For building free bounds it uses ShapeAnalysis_FreeBounds class. |
26 | -- This class complements it with the feature to reduce the number |
27 | -- of open wires. |
28 | -- This reduction is performed with help of connecting several |
29 | -- adjacent open wires one to another what can lead to: |
30 | -- 1. making an open wire with greater length out of several |
31 | -- open wires |
32 | -- 2. making closed wire out of several open wires |
33 | -- |
34 | -- The connecting open wires is performed with a user-given |
35 | -- tolerance. |
36 | -- |
37 | -- When connecting several open wires into one wire their previous |
38 | -- end vertices are replaced with new connecting vertices. After |
39 | -- that all the edges in the shape sharing previous vertices inside |
40 | -- the shape are updated with new vertices. Thus source shape can |
41 | -- be modified. |
42 | -- |
43 | -- Since interface of this class is the same as one of |
44 | -- ShapeAnalysis_FreeBounds refer to its CDL for details. |
45 | |
46 | |
47 | uses |
48 | Shape from TopoDS, |
49 | Compound from TopoDS |
50 | |
51 | is |
52 | |
53 | Create returns FreeBounds from ShapeFix; |
54 | ---Purpose: Empty constructor |
55 | |
56 | Create (shape : Shape from TopoDS; |
57 | sewtoler : Real; |
58 | closetoler : Real; |
59 | splitclosed: Boolean; |
60 | splitopen : Boolean) |
61 | returns FreeBounds from ShapeFix; |
62 | ---Purpose: Builds forecasting free bounds of the <shape> and connects |
63 | -- open wires with tolerance <closetoler>. |
64 | -- <shape> should be a compound of faces. |
65 | -- Tolerance <closetoler> should be greater than tolerance |
66 | -- <sewtoler> used for initializing sewing analyzer, otherwise |
67 | -- connection of open wires is not performed. |
68 | |
69 | Create (shape : Shape from TopoDS; |
70 | closetoler : Real; |
71 | splitclosed: Boolean; |
72 | splitopen : Boolean) |
73 | returns FreeBounds from ShapeFix; |
74 | ---Purpose: Builds actual free bounds of the <shape> and connects |
75 | -- open wires with tolerance <closetoler>. |
76 | -- <shape> should be a compound of shells. |
77 | |
78 | GetClosedWires (me) returns Compound from TopoDS; |
79 | ---Purpose: Returns compound of closed wires out of free edges. |
80 | ---C++: inline |
81 | ---C++: return const & |
82 | |
83 | GetOpenWires (me) returns Compound from TopoDS; |
84 | ---Purpose: Returns compound of open wires out of free edges. |
85 | ---C++: inline |
86 | ---C++: return const & |
87 | |
88 | GetShape (me) returns Shape from TopoDS; |
89 | ---Purpose: Returns modified source shape. |
90 | ---C++: inline |
91 | ---C++: return const & |
92 | |
93 | |
94 | ---Level: Internal |
95 | Perform (me: in out) returns Boolean is private; |
96 | |
97 | fields |
98 | |
99 | myWires: Compound from TopoDS; |
100 | myEdges: Compound from TopoDS; |
101 | myShape: Shape from TopoDS; |
102 | |
103 | myShared : Boolean; |
104 | mySewToler : Real; |
105 | myCloseToler : Real; |
106 | mySplitClosed: Boolean; |
107 | mySplitOpen : Boolean; |
108 | |
109 | end FreeBounds; |