b311480e |
1 | -- Created on: 1996-02-13 |
2 | -- Created by: Yves FRICAUD |
3 | -- Copyright (c) 1996-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. |
7fd59977 |
16 | |
17 | class MakeThickSolid from BRepOffsetAPI inherits MakeOffsetShape from BRepOffsetAPI |
18 | |
19 | ---Purpose: Describes functions to build hollowed solids. |
20 | -- A hollowed solid is built from an initial solid and a set of |
21 | -- faces on this solid, which are to be removed. The |
22 | -- remaining faces of the solid become the walls of the |
23 | -- hollowed solid, their thickness defined at the time of construction. |
24 | -- the solid is built from an initial |
25 | -- solid <S> and a set of faces {Fi} from <S>, |
26 | -- builds a solid composed by two shells closed by |
27 | -- the {Fi}. First shell <SS> is composed by all |
28 | -- the faces of <S> expected {Fi}. Second shell is |
29 | -- the offset shell of <SS>. |
30 | -- A MakeThickSolid object provides a framework for: |
31 | -- - defining the cross-section of a hollowed solid, |
32 | -- - implementing the construction algorithm, and |
33 | -- - consulting the result. |
34 | uses |
35 | |
36 | MakeOffset from BRepOffset, |
37 | Mode from BRepOffset, |
38 | Shape from TopoDS, |
39 | Face from TopoDS, |
40 | ListOfShape from TopTools, |
41 | JoinType from GeomAbs |
42 | |
43 | is |
44 | |
45 | |
46 | Create returns MakeThickSolid from BRepOffsetAPI; |
47 | |
48 | |
49 | Create ( S : Shape from TopoDS; |
50 | ClosingFaces : ListOfShape from TopTools; |
51 | Offset : Real from Standard; |
52 | Tol : Real from Standard ; |
53 | Mode : Mode from BRepOffset = BRepOffset_Skin; |
54 | Intersection : Boolean from Standard = Standard_False; |
55 | SelfInter : Boolean from Standard = Standard_False; |
56 | Join : JoinType from GeomAbs = GeomAbs_Arc) |
57 | ---Purpose: Constructs a hollowed solid from |
58 | -- the solid S by removing the set of faces ClosingFaces from S, where: |
59 | -- Offset defines the thickness of the walls. Its sign indicates |
60 | -- which side of the surface of the solid the hollowed shape is built on; |
61 | -- - Tol defines the tolerance criterion for coincidence in generated shapes; |
62 | -- - Mode defines the construction type of parallels applied to free |
63 | -- edges of shape S. Currently, only one construction type is |
64 | -- implemented, namely the one where the free edges do not generate |
65 | -- parallels; this corresponds to the default value BRepOffset_Skin; |
66 | -- Intersection specifies how the algorithm must work in order to |
67 | -- limit the parallels to two adjacent shapes: |
68 | -- - if Intersection is false (default value), the intersection |
69 | -- is calculated with the parallels to the two adjacent shapes, |
70 | -- - if Intersection is true, the intersection is calculated by |
71 | -- taking account of all parallels generated; this computation |
72 | -- method is more general as it avoids self-intersections |
73 | -- generated in the offset shape from features of small dimensions |
74 | -- on shape S, however this method has not been completely |
75 | -- implemented and therefore is not recommended for use; |
76 | -- - SelfInter tells the algorithm whether a computation to |
77 | -- eliminate self-intersections needs to be applied to the |
78 | -- resulting shape. However, as this functionality is not yet |
79 | -- implemented, you should use the default value (false); |
80 | -- - Join defines how to fill the holes that may appear between |
81 | -- parallels to the two adjacent faces. It may take values |
82 | -- GeomAbs_Arc or GeomAbs_Intersection: |
83 | -- - if Join is equal to GeomAbs_Arc, then pipes are generated |
84 | -- between two free edges of two adjacent parallels, |
85 | -- and spheres are generated on "images" of vertices; |
86 | -- it is the default value, |
87 | -- - if Join is equal to GeomAbs_Intersection, |
88 | -- then the parallels to the two adjacent faces are |
89 | -- enlarged and intersected, so that there are no free |
90 | -- edges on parallels to faces. |
91 | -- Warnings |
92 | -- Since the algorithm of MakeThickSolid is based on |
93 | -- MakeOffsetShape algorithm, the warnings are the same as for |
94 | -- MakeOffsetShape. |
95 | returns MakeThickSolid from BRepOffsetAPI; |
96 | |
97 | Build (me : in out) |
98 | is redefined; |
99 | ---Purpose: Builds the resulting shape (redefined from MakeOffsetShape). |
100 | ---Level: Public |
101 | |
102 | |
103 | Modified (me: in out; S : Shape from TopoDS) |
104 | ---Purpose: Returns the list of shapes modified from the shape |
105 | -- <S>. |
106 | ---C++: return const & |
107 | ---Level: Public |
108 | returns ListOfShape from TopTools |
109 | is redefined virtual; |
110 | |
111 | |
112 | end MakeThickSolid; |