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