b311480e |
1 | -- Created on: 1995-10-12 |
2 | -- Created by: Bruno DUMORTIER |
3 | -- Copyright (c) 1995-1999 Matra Datavision |
4 | -- Copyright (c) 1999-2012 OPEN CASCADE SAS |
5 | -- |
6 | -- The content of this file is subject to the Open CASCADE Technology Public |
7 | -- License Version 6.5 (the "License"). You may not use the content of this file |
8 | -- except in compliance with the License. Please obtain a copy of the License |
9 | -- at http://www.opencascade.org and read it completely before using this file. |
10 | -- |
11 | -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its |
12 | -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France. |
13 | -- |
14 | -- The Original Code and all software distributed under the License is |
15 | -- distributed on an "AS IS" basis, without warranty of any kind, and the |
16 | -- Initial Developer hereby disclaims all such warranties, including without |
17 | -- limitation, any warranties of merchantability, fitness for a particular |
18 | -- purpose or non-infringement. Please see the License for the specific terms |
19 | -- and conditions governing the rights and limitations under the License. |
20 | |
7fd59977 |
21 | |
22 | |
23 | |
24 | package BRepOffset |
25 | |
26 | ---Purpose: |
27 | |
28 | uses |
29 | MMgt, |
30 | Geom, |
31 | TopoDS, |
32 | TopAbs, |
33 | TCollection, |
34 | TopTools, |
35 | GeomAbs, |
4e57c75e |
36 | BRepAlgo, |
37 | BOPAlgo, |
38 | BOPDS, |
39 | BOPTools |
7fd59977 |
40 | |
41 | is |
42 | enumeration Type is |
43 | Concave, |
44 | Convex, |
45 | Tangent, |
46 | FreeBoundary, |
47 | Other |
48 | end Type; |
49 | |
50 | enumeration Mode is |
51 | Skin, |
52 | Pipe, |
53 | RectoVerso |
54 | end Mode; |
55 | ---Purpose: |
56 | -- Lists the offset modes. These are the following: |
57 | -- - BRepOffset_Skin which describes the offset along |
58 | -- the surface of a solid, used to obtain a manifold topological space, |
59 | -- - BRepOffset_Pipe which describes the offset of a |
60 | -- curve, used to obtain a pre-surface, |
61 | -- - BRepOffset_RectoVerso which describes the offset |
62 | -- of a given surface shell along both sides of the surface. |
63 | |
64 | enumeration Status is |
65 | ---Purpose: status of an offset face |
66 | -- Good : |
67 | -- Reversed : e.g. Offset > Radius of a cylinder |
68 | -- Degenerated : e.g. Offset = Radius of a cylinder |
69 | -- Unknown : e.g. for a Beziersurf |
70 | Good, |
71 | Reversed, |
72 | Degenerated, |
73 | Unknown |
74 | end Status; |
75 | |
76 | enumeration Error is |
77 | NoError, |
78 | OffsetSurfaceFailed, |
79 | UnCorrectClosingFace, |
80 | ExtentFaceFailed, |
81 | RadiusEqualOffset, |
82 | UnknownError |
83 | end Error; |
84 | |
85 | class MakeOffset; |
86 | |
87 | --class Loop; |
88 | |
89 | class Inter3d; |
90 | |
91 | class Inter2d; |
92 | |
93 | class Offset; |
94 | ---Purpose: This class compute elemenary offset surface. |
95 | -- Evaluate the offset generated : |
96 | -- 1 - from a face. |
97 | -- 2 - from an edge. |
98 | -- 3 - from a vertex. |
99 | -- |
100 | |
101 | class Analyse; |
102 | |
103 | class MakeLoops; |
104 | |
105 | class Tool; |
106 | |
107 | --class Image; |
108 | |
109 | --class AsDes; |
110 | |
111 | |
112 | class Interval; |
113 | |
114 | class ListOfInterval instantiates |
115 | List from TCollection (Interval from BRepOffset); |
116 | |
117 | class DataMapOfShapeListOfInterval instantiates |
118 | DataMap from TCollection(Shape from TopoDS, |
119 | ListOfInterval from BRepOffset, |
120 | ShapeMapHasher from TopTools ); |
121 | |
122 | class DataMapOfShapeOffset instantiates |
123 | DataMap from TCollection(Shape from TopoDS, |
124 | Offset from BRepOffset, |
125 | ShapeMapHasher from TopTools ); |
126 | |
127 | class DataMapOfShapeMapOfShape instantiates |
128 | DataMap from TCollection(Shape from TopoDS, |
129 | MapOfShape from TopTools, |
130 | ShapeMapHasher from TopTools); |
131 | |
132 | |
133 | Surface( Surface : in Surface from Geom; |
134 | Offset : in Real from Standard; |
135 | Status : out Status from BRepOffset) |
136 | ---Purpose: returns the Offset surface computed from the |
137 | -- surface <Surface> at an OffsetDistance <Offset>. |
138 | -- |
139 | -- If possible, this method returns the real type of |
140 | -- the surface ( e.g. An Offset of a plane is a plane). |
141 | -- |
142 | -- If no particular case is detected, the returned |
143 | -- surface will have the Type Geom_OffsetSurface. |
144 | returns Surface from Geom; |
145 | |
146 | end BRepOffset; |