/src/contrib/geom-5.1.2.7/src/GEOMAlgo/GEOMAlgo_Tools3D.cdl

http://pythonocc.googlecode.com/ · Unknown · 238 lines · 212 code · 26 blank · 0 comment · 0 complexity · b209e2f81f8eec31b83f3f82d29b4471 MD5 · raw file

  1. -- Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
  2. --
  3. -- Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
  4. -- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
  5. --
  6. -- This library is free software; you can redistribute it and/or
  7. -- modify it under the terms of the GNU Lesser General Public
  8. -- License as published by the Free Software Foundation; either
  9. -- version 2.1 of the License.
  10. --
  11. -- This library is distributed in the hope that it will be useful,
  12. -- but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. -- Lesser General Public License for more details.
  15. --
  16. -- You should have received a copy of the GNU Lesser General Public
  17. -- License along with this library; if not, write to the Free Software
  18. -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  19. --
  20. -- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
  21. --
  22. -- File: GEOMAlgo_Tools3D.cdl
  23. -- Created:
  24. -- Author: Peter KURNEV
  25. --
  26. class Tools3D from GEOMAlgo
  27. ---Purpose: Auxiliary tools for Algorithms
  28. uses
  29. State from TopAbs,
  30. ShapeEnum from TopAbs,
  31. Pnt from gp,
  32. Shape from TopoDS,
  33. Vertex from TopoDS,
  34. Edge from TopoDS,
  35. Face from TopoDS,
  36. Solid from TopoDS,
  37. ListOfShape from TopTools,
  38. IndexedMapOfShape from TopTools,
  39. IndexedDataMapOfShapeListOfShape from TopTools,
  40. Context from IntTools,
  41. ListOfCoupleOfShape from NMTTools
  42. --raises
  43. is
  44. IsSplitToReverse(myclass;
  45. theSplit : Shape from TopoDS;
  46. theShape : Shape from TopoDS;
  47. theContext:out Context from IntTools)
  48. ---Purpose: Returns True if the shape theSplit has opposite
  49. -- direction than theShape
  50. -- theContext - cashed geometrical tools
  51. returns Boolean from Standard;
  52. IsSplitToReverse(myclass;
  53. theSplit : Face from TopoDS;
  54. theShape : Face from TopoDS;
  55. theContext:out Context from IntTools)
  56. ---Purpose: Returns True if normal direction of the face
  57. -- theShape is not the same as for the face
  58. -- theSplit
  59. -- theContext - cashed geometrical tools
  60. returns Boolean from Standard;
  61. IsSplitToReverse(myclass;
  62. theEdge : Edge from TopoDS;
  63. theSplit : Edge from TopoDS;
  64. theContext:out Context from IntTools)
  65. ---Purpose: Returns True if tangent direction of the edge
  66. -- theEdge is not the same as for the edge
  67. -- theSplit
  68. -- theContext - cashed geometrical tools
  69. returns Boolean from Standard;
  70. Sense (myclass;
  71. theF1: Face from TopoDS;
  72. theF2: Face from TopoDS)
  73. ---Purpose: For the couple of faces theF1, theF2
  74. -- computes sense value
  75. -- Returns 0 if the faces are not sensible
  76. -- Returns 1 if the faces have same sense
  77. -- Returns 2 if the faces have opposite sense
  78. returns Integer from Standard;
  79. CopyFace(myclass;
  80. theF1: Face from TopoDS;
  81. theF2:out Face from TopoDS);
  82. ---Purpose: Makes new face theF2 from surface and wires
  83. -- of the face theF1
  84. MakeContainer(myclass;
  85. theType:ShapeEnum from TopAbs;
  86. theShape:out Shape from TopoDS);
  87. ---Purpose: Makes empty shape theShape of the type theType
  88. MakeConnexityBlock(myclass;
  89. theLS :ListOfShape from TopTools;
  90. theMapAvoid:IndexedMapOfShape from TopTools;
  91. theLSCB :out ListOfShape from TopTools);
  92. ---Purpose: For the list of faces theLS build block
  93. -- theLSCB in terms of connexity by edges
  94. -- theMapAvoid - set of edges to avoid for
  95. -- the treatment
  96. ComputeStateByOnePoint(myclass;
  97. theShape :Shape from TopoDS;
  98. theSolid :Solid from TopoDS;
  99. theTol :Real from Standard;
  100. theContext:out Context from IntTools)
  101. ---Purpose: Computes the 3-D state of the shape theShape
  102. -- toward solid theSolid.
  103. -- theTol - value of precision of computation
  104. -- theContext- cahed geometrical tools
  105. -- Returns 3-D state.
  106. returns State from TopAbs;
  107. ComputeState(myclass;
  108. thePoint :Pnt from gp;
  109. theSolid :Solid from TopoDS;
  110. theTol :Real from Standard;
  111. theContext:out Context from IntTools)
  112. ---Purpose: Computes the 3-D state of the point thePoint
  113. -- toward solid theSolid.
  114. -- theTol - value of precision of computation
  115. -- theContext- cahed geometrical tools
  116. -- Returns 3-D state.
  117. returns State from TopAbs;
  118. ComputeState(myclass;
  119. theVertex:Vertex from TopoDS;
  120. theSolid :Solid from TopoDS;
  121. theTol :Real from Standard;
  122. theContext:out Context from IntTools)
  123. ---Purpose: Computes the 3-D state of the vertex theVertex
  124. -- toward solid theSolid.
  125. -- theTol - value of precision of computation
  126. -- theContext- cahed geometrical tools
  127. -- Returns 3-D state.
  128. returns State from TopAbs;
  129. ComputeState(myclass;
  130. theEdge :Edge from TopoDS;
  131. theSolid :Solid from TopoDS;
  132. theTol :Real from Standard;
  133. theContext:out Context from IntTools)
  134. ---Purpose: Computes the 3-D state of the edge theEdge
  135. -- toward solid theSolid.
  136. -- theTol - value of precision of computation
  137. -- theContext- cahed geometrical tools
  138. -- Returns 3-D state.
  139. returns State from TopAbs;
  140. ComputeState(myclass;
  141. theFace :Face from TopoDS;
  142. theSolid :Solid from TopoDS;
  143. theTol :Real from Standard;
  144. theBounds:IndexedMapOfShape from TopTools;
  145. theContext:out Context from IntTools)
  146. ---Purpose: Computes the 3-D state of the face theFace
  147. -- toward solid theSolid.
  148. -- theTol - value of precision of computation
  149. -- theBounds - set of edges of theFace to avoid
  150. -- theContext- cahed geometrical tools
  151. -- Returns 3-D state.
  152. returns State from TopAbs;
  153. IsInternalFace(myclass;
  154. theFace :Face from TopoDS;
  155. theEdge :Edge from TopoDS;
  156. theFace1 :Face from TopoDS;
  157. theFace2 :Face from TopoDS)
  158. ---Purpose: Returns True if the face theFace is inside of the
  159. -- couple of faces theFace1, theFace2.
  160. -- The faces theFace, theFace1, theFace2 must
  161. -- share the edge theEdge
  162. returns Boolean from Standard;
  163. IsInternalFace(myclass;
  164. theFace :Face from TopoDS;
  165. theEdge :Edge from TopoDS;
  166. theLF :ListOfShape from TopTools)
  167. ---Purpose: Returns True if the face theFace is inside of the
  168. -- appropriate couple of faces (from the set theLF) .
  169. -- The faces of the set theLF and theFace must
  170. -- share the edge theEdge
  171. returns Boolean from Standard;
  172. IsInternalFace(myclass;
  173. theFace :Face from TopoDS;
  174. theSolid :Solid from TopoDS;
  175. theMEF :IndexedDataMapOfShapeListOfShape from TopTools;
  176. theTol :Real from Standard;
  177. theContext:out Context from IntTools)
  178. ---Purpose: Returns True if the face theFace is inside the
  179. -- solid theSolid.
  180. -- theMEF - Map Edge/Faces for theSolid
  181. -- theTol - value of precision of computation
  182. -- theContext- cahed geometrical tools
  183. returns Boolean from Standard;
  184. GetFaceOff(myclass;
  185. theEdge :Edge from TopoDS;
  186. theFace :Face from TopoDS;
  187. theLCEF :ListOfCoupleOfShape from NMTTools;
  188. theFaceOff :out Face from TopoDS);
  189. ---Purpose: For the face theFace and its edge theEdge
  190. -- finds the face suitable to produce shell.
  191. -- theLCEF - set of faces to search. All faces
  192. -- from theLCEF must share edge theEdge
  193. GetEdgeOnFace (myclass;
  194. theEdge :Edge from TopoDS;
  195. theFace :Face from TopoDS;
  196. theEdgeOnF :out Edge from TopoDS)
  197. ---Purpose: For the face theFace gets the edge theEdgeOnF
  198. -- that is the same as theEdge
  199. -- Returns True if such edge exists
  200. -- Returns False if there is no such edge
  201. returns Boolean from Standard;
  202. GetEdgeOff (myclass;
  203. theEdge :Edge from TopoDS;
  204. theFace :Face from TopoDS;
  205. theEdgeOff :out Edge from TopoDS)
  206. ---Purpose: Returns True if the face theFace contains
  207. -- the edge theEdge but with opposite orientation.
  208. -- If the method returns True theEdgeOff is the
  209. -- edge founded
  210. returns Boolean from Standard;
  211. --fields
  212. end Tools3D;