summary | shortlog | log | commit | commitdiff | tree

blob | blame (non-incremental) | history | HEAD

blob | blame (non-incremental) | history | HEAD

... / ...

Commit | Line | Data |
---|---|---|

1 | -- Created on: 1993-07-06 | |

2 | -- Created by: Remi LEQUETTE | |

3 | -- Copyright (c) 1993-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 | ||

21 | -- modified by Peter KURNEV Tue Mar 5 14:01:51 2002 | |

22 | ||

23 | ||

24 | ||

25 | package BRepAlgoAPI | |

26 | ||

27 | ---Purpose: The BRepAlgoAPI package provides a full range of | |

28 | -- services to perform Boolean Operations on arguments (shapes | |

29 | -- that are defined in the BRep data structures). The | |

30 | -- implemented new algorithm is intended to replace the Old | |

31 | -- Boolean Operations algorithm in the BRepAlgoAPI package. | |

32 | -- The New algorithm is free of a large number of weak spots | |

33 | -- and limitations characteristics of the Old algorithm. | |

34 | -- It is more powerful and flexible. | |

35 | -- It can process arguments the Old algorithm was not adapted for. | |

36 | -- The new algorithm is based on a new approach to operations | |

37 | -- with interfered shapes. The advantages of the new algorithm | |

38 | -- include an ability to treat arguments that have shared | |

39 | -- entities. It can properly process two solids with shared | |

40 | -- faces (in terms of TopoDS_Shape::IsSame()), two | |

41 | -- faces that have shared edges and so on. Now the New Boolean | |

42 | -- Operation algorithm can treat a wide range of shapes while the | |

43 | -- Old one fails on them. | |

44 | -- A generalization of treatment of same-domain faces | |

45 | -- was included into the New algorithm. Two faces that share | |

46 | -- the same domain are processed according to the common rule | |

47 | -- even if the underlying surfaces are of different types. This | |

48 | -- allows to execute Boolean Operations properly for the same | |

49 | -- domain faces. It also concerns solids and shells that have the | |

50 | -- same domain faces. It is quite frequent when two faces share | |

51 | -- the same domain. And the New algorithm successfully copes | |

52 | -- with it in contrast to the Old one. | |

53 | -- Generalization oftreatment of degenerated edges | |

54 | -- gives a possibility to process them properly. Although there | |

55 | -- are still some difficulties with processing faces in areas close | |

56 | -- to degenerated edges. | |

57 | -- Now the processing of arguments having internal sub-shapes gives | |

58 | -- a correct result. Internal sub-shape means a sub-shape of a | |

59 | -- shape with the orientation TopAbs_INTERNAL and is located | |

60 | -- inside the shape boundaries. The New algorithm processes faces | |

61 | -- with internal edges properly. The new API of the Boolean | |

62 | -- Operations (in addition to the old API) allows to reuse the | |

63 | -- already computed interference between arguments in different | |

64 | -- types of Boolean Operations. It is possible to use once computed | |

65 | -- interference in FUSE, CUT and COMMON operations on given | |

66 | -- arguments. So there is no need to re-compute the interference | |

67 | -- between the arguments. It allows to reduce time for more than one | |

68 | -- operation on given arguments. | |

69 | -- The shape type of a Boolean Operation result and types of the arguments: | |

70 | -- - For arguments with the same shape type (e.g. SOLID / | |

71 | -- SOLID) the type of the resulting shape will be a | |

72 | -- COMPOUND, containing shapes of this type; | |

73 | -- - For arguments with different shape types (e.g. | |

74 | -- SHELL / SOLID) the type of the resulting shape will be a | |

75 | -- COMPOUND, containing shapes of the type that is the same as | |

76 | -- that of the low type of the argument. Example: For | |

77 | -- SHELL/SOLID the result is a COMPOUND of SHELLs. | |

78 | -- - For arguments with different shape types some of | |

79 | -- Boolean Operations can not be done using the default | |

80 | -- implementation, because of a non-manifold type of the | |

81 | -- result. Example: the FUSE operation for SHELL and SOLID | |

82 | -- can not be done, but the CUT operation can be done, where | |

83 | -- SHELL is the object and SOLID is the tool. | |

84 | -- It is possible to perform Boolean Operations on arguments | |

85 | -- of the COMPOUND shape type. In this case each compound must not | |

86 | -- be heterogeneous, i.e. it must contain equidimensional shapes | |

87 | -- (EDGEs or/and WIREs, FACEs or/and SHELLs, SOLIDs). SOLIDs | |

88 | -- inside the COMPOUND must not contact (intersect or touch) | |

89 | -- each other. The same condition is true for SHELLs or FACEs, | |

90 | -- WIREs or EDGEs. | |

91 | -- It does not support Boolean Operations for COMPSOLID type of shape. | |

92 | ||

93 | uses | |

94 | TopTools, | |

95 | TopoDS, | |

96 | gp, | |

97 | Geom, | |

98 | Geom2d, | |

99 | BOPAlgo, | |

100 | BOPDS, | |

101 | BRepBuilderAPI | |

102 | is | |

103 | ||

104 | deferred class BooleanOperation; | |

105 | ---Purpose: Root class for boolean operations. | |

106 | ||

107 | class Fuse; | |

108 | ---Purpose: Perform the boolean operation FUSE. | |

109 | --- | |

110 | class Common; | |

111 | ---Purpose: Perform the boolean operation COMMON. | |

112 | --- | |

113 | class Cut; | |

114 | ---Purpose: Perform the boolean operation CUT. | |

115 | --- | |

116 | class Section; | |

117 | ---Purpose: Perform the operation SECTION. | |

118 | --- | |

119 | class Check; | |

120 | ---Purpose: Check shapes on validity for boolean | |

121 | --- operation. | |

122 | ||

123 | DumpOper( theFilePath : CString from Standard; | |

124 | theShape1 : Shape from TopoDS; | |

125 | theShape2 : Shape from TopoDS; | |

126 | theResult : Shape from TopoDS; | |

127 | theOperation : Operation from BOPAlgo; | |

128 | isNonValidArgs : Boolean from Standard ); | |

129 | ---Purpose: Dump arguments and result of boolean operation in the file specified by path. | |

130 | ---Level: Public | |

131 | ||

132 | end BRepAlgoAPI; | |

133 |