b311480e |
1 | -- Created on: 1993-07-06 |
2 | -- Created by: Remi LEQUETTE |
3 | -- Copyright (c) 1993-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 | -- |
973c2be1 |
8 | -- This library is free software; you can redistribute it and / or modify it |
9 | -- under the terms of the GNU Lesser General Public 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. |
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 | -- modified by Peter KURNEV Tue Mar 5 14:01:51 2002 |
7fd59977 |
18 | |
19 | |
20 | |
21 | package BRepAlgoAPI |
22 | |
23 | ---Purpose: The BRepAlgoAPI package provides a full range of |
24 | -- services to perform Boolean Operations on arguments (shapes |
25 | -- that are defined in the BRep data structures). The |
26 | -- implemented new algorithm is intended to replace the Old |
27 | -- Boolean Operations algorithm in the BRepAlgoAPI package. |
28 | -- The New algorithm is free of a large number of weak spots |
29 | -- and limitations characteristics of the Old algorithm. |
30 | -- It is more powerful and flexible. |
31 | -- It can process arguments the Old algorithm was not adapted for. |
32 | -- The new algorithm is based on a new approach to operations |
33 | -- with interfered shapes. The advantages of the new algorithm |
34 | -- include an ability to treat arguments that have shared |
35 | -- entities. It can properly process two solids with shared |
36 | -- faces (in terms of TopoDS_Shape::IsSame()), two |
37 | -- faces that have shared edges and so on. Now the New Boolean |
38 | -- Operation algorithm can treat a wide range of shapes while the |
39 | -- Old one fails on them. |
40 | -- A generalization of treatment of same-domain faces |
41 | -- was included into the New algorithm. Two faces that share |
42 | -- the same domain are processed according to the common rule |
43 | -- even if the underlying surfaces are of different types. This |
44 | -- allows to execute Boolean Operations properly for the same |
45 | -- domain faces. It also concerns solids and shells that have the |
46 | -- same domain faces. It is quite frequent when two faces share |
47 | -- the same domain. And the New algorithm successfully copes |
48 | -- with it in contrast to the Old one. |
49 | -- Generalization oftreatment of degenerated edges |
50 | -- gives a possibility to process them properly. Although there |
51 | -- are still some difficulties with processing faces in areas close |
52 | -- to degenerated edges. |
53 | -- Now the processing of arguments having internal sub-shapes gives |
54 | -- a correct result. Internal sub-shape means a sub-shape of a |
55 | -- shape with the orientation TopAbs_INTERNAL and is located |
56 | -- inside the shape boundaries. The New algorithm processes faces |
57 | -- with internal edges properly. The new API of the Boolean |
58 | -- Operations (in addition to the old API) allows to reuse the |
59 | -- already computed interference between arguments in different |
60 | -- types of Boolean Operations. It is possible to use once computed |
61 | -- interference in FUSE, CUT and COMMON operations on given |
62 | -- arguments. So there is no need to re-compute the interference |
63 | -- between the arguments. It allows to reduce time for more than one |
64 | -- operation on given arguments. |
65 | -- The shape type of a Boolean Operation result and types of the arguments: |
66 | -- - For arguments with the same shape type (e.g. SOLID / |
67 | -- SOLID) the type of the resulting shape will be a |
68 | -- COMPOUND, containing shapes of this type; |
69 | -- - For arguments with different shape types (e.g. |
70 | -- SHELL / SOLID) the type of the resulting shape will be a |
71 | -- COMPOUND, containing shapes of the type that is the same as |
72 | -- that of the low type of the argument. Example: For |
73 | -- SHELL/SOLID the result is a COMPOUND of SHELLs. |
74 | -- - For arguments with different shape types some of |
75 | -- Boolean Operations can not be done using the default |
76 | -- implementation, because of a non-manifold type of the |
77 | -- result. Example: the FUSE operation for SHELL and SOLID |
78 | -- can not be done, but the CUT operation can be done, where |
79 | -- SHELL is the object and SOLID is the tool. |
80 | -- It is possible to perform Boolean Operations on arguments |
81 | -- of the COMPOUND shape type. In this case each compound must not |
82 | -- be heterogeneous, i.e. it must contain equidimensional shapes |
83 | -- (EDGEs or/and WIREs, FACEs or/and SHELLs, SOLIDs). SOLIDs |
84 | -- inside the COMPOUND must not contact (intersect or touch) |
85 | -- each other. The same condition is true for SHELLs or FACEs, |
86 | -- WIREs or EDGEs. |
87 | -- It does not support Boolean Operations for COMPSOLID type of shape. |
88 | |
89 | uses |
90 | TopTools, |
91 | TopoDS, |
92 | gp, |
93 | Geom, |
4e57c75e |
94 | Geom2d, |
95 | BOPAlgo, |
96 | BOPDS, |
7fd59977 |
97 | BRepBuilderAPI |
98 | is |
99 | |
100 | deferred class BooleanOperation; |
101 | ---Purpose: Root class for boolean operations. |
102 | |
103 | class Fuse; |
104 | ---Purpose: Perform the boolean operation FUSE. |
105 | --- |
106 | class Common; |
107 | ---Purpose: Perform the boolean operation COMMON. |
108 | --- |
109 | class Cut; |
110 | ---Purpose: Perform the boolean operation CUT. |
111 | --- |
112 | class Section; |
da219023 |
113 | ---Purpose: Perform the operation SECTION. |
114 | --- |
4e57c75e |
115 | class Check; |
116 | ---Purpose: Check shapes on validity for boolean |
117 | --- operation. |
da219023 |
118 | |
119 | DumpOper( theFilePath : CString from Standard; |
120 | theShape1 : Shape from TopoDS; |
121 | theShape2 : Shape from TopoDS; |
122 | theResult : Shape from TopoDS; |
123 | theOperation : Operation from BOPAlgo; |
124 | isNonValidArgs : Boolean from Standard ); |
125 | ---Purpose: Dump arguments and result of boolean operation in the file specified by path. |
126 | ---Level: Public |
4e57c75e |
127 | |
7fd59977 |
128 | end BRepAlgoAPI; |
4e57c75e |
129 | |