/src/contrib/geom-5.1.2.7/src/Partition/Partition_Inter3d.cdl

http://pythonocc.googlecode.com/ · Unknown · 194 lines · 160 code · 34 blank · 0 comment · 0 complexity · f71d84b862e8d2baa8a5ab3a71fbdfbc MD5 · raw file

  1. // Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
  2. // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
  3. //
  4. // This library is free software; you can redistribute it and/or
  5. // modify it under the terms of the GNU Lesser General Public
  6. // License as published by the Free Software Foundation; either
  7. // version 2.1 of the License.
  8. //
  9. // This library is distributed in the hope that it will be useful
  10. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. // Lesser General Public License for more details.
  13. //
  14. // You should have received a copy of the GNU Lesser General Public
  15. // License along with this library; if not, write to the Free Software
  16. // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  17. //
  18. -- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
  19. //
  20. -- GEOM PARTITION : partition algorithm
  21. --
  22. -- Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
  23. -- CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
  24. --
  25. -- This library is free software; you can redistribute it and/or
  26. -- modify it under the terms of the GNU Lesser General Public
  27. -- License as published by the Free Software Foundation; either
  28. -- version 2.1 of the License.
  29. --
  30. -- This library is distributed in the hope that it will be useful,
  31. -- but WITHOUT ANY WARRANTY; without even the implied warranty of
  32. -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  33. -- Lesser General Public License for more details.
  34. --
  35. -- You should have received a copy of the GNU Lesser General Public
  36. -- License along with this library; if not, write to the Free Software
  37. -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  38. --
  39. -- See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
  40. --
  41. --
  42. --
  43. -- File : Partition_Inter3d.cdl
  44. -- Author : Benedicte MARTIN
  45. -- Module : GEOM
  46. class Inter3d from Partition
  47. ---Purpose: Computes the intersection face face in a set of faces
  48. -- Store the result in a SD as AsDes.
  49. uses
  50. Edge from TopoDS,
  51. Vertex from TopoDS,
  52. DataMapOfShapeShape from TopTools,
  53. MapOfShape from TopTools,
  54. Boolean from Standard,
  55. AsDes from BRepAlgo,
  56. Image from BRepAlgo,
  57. Shape from TopoDS,
  58. Face from TopoDS,
  59. ListOfShape from TopTools,
  60. Real from Standard,
  61. State from TopAbs,
  62. DataMapOfShapeListOfShape from TopTools
  63. is
  64. Create returns Inter3d from Partition;
  65. Create(AsDes : mutable AsDes from BRepAlgo);
  66. CompletPart3d (me : in out; SetOfFaces1 : ListOfShape from TopTools;
  67. FaceShapeMap: DataMapOfShapeShape from TopTools)
  68. is static;
  69. FacesPartition (me : in out; F1, F2 : Face from TopoDS)
  70. is static;
  71. ----------------------------
  72. ---Category: Result Querying
  73. ----------------------------
  74. IsDone(me ; F1,F2 : Face from TopoDS)
  75. returns Boolean from Standard is static;
  76. ---Purpose: return True if F1-F2 pair has been processed
  77. TouchedFaces(me : in out) returns MapOfShape from TopTools
  78. ---C++: return &
  79. is static;
  80. ---Purpose: return map of faces cut by new or section edges
  81. NewEdges(me : in out) returns MapOfShape from TopTools
  82. ---C++: return &
  83. is static;
  84. ---Purpose: return new and section edges
  85. AsDes(me) returns AsDes from BRepAlgo
  86. is static;
  87. ---Purpose: return an object containing info about
  88. -- Ascendants | Descendants
  89. -- ------------------+---------------------
  90. -- 1. faces | edges cutting them
  91. -- 2. sectoin edges | new vertices on them
  92. -------------------------------
  93. ---Category: Same domain shapes
  94. -------------------------------
  95. HasSameDomainF(me; F : Shape from TopoDS)
  96. returns Boolean from Standard;
  97. ---Purpose: Return true if F has same domain faces
  98. IsSameDomainF(me; F1, F2 : Shape from TopoDS)
  99. returns Boolean from Standard;
  100. ---Purpose: Return true if F1 and F2 are same domain faces
  101. SameDomain(me; F : Face from TopoDS)
  102. returns ListOfShape from TopTools;
  103. ---C++: return const &
  104. ---Purpose: Return same domain faces of F
  105. ReplaceSameDomainV (me; V : Vertex from TopoDS;
  106. E : Edge from TopoDS)
  107. returns Vertex from TopoDS;
  108. ---Purpose: return same domain vertex of V if it was replaced
  109. -- and make this vertex to be on E too, else return V
  110. --------------------------
  111. ---Category: Section edges
  112. --------------------------
  113. SectionEdgesAD (me) returns AsDes from BRepAlgo
  114. is static;
  115. IsSectionEdge (me; E : Edge from TopoDS)
  116. returns Boolean from Standard;
  117. ---Purpose: return True if E is an edge of an initial face and
  118. -- E intersects aother face
  119. HasSectionEdge (me; F : Face from TopoDS)
  120. returns Boolean from Standard;
  121. ---Purpose: return True if F is intersected by an edge of
  122. -- other face
  123. IsSplitOn (me; NewE, OldE : Edge from TopoDS;
  124. F : Face from TopoDS)
  125. returns Boolean from Standard;
  126. ---Purpose: return True if NewE is split of OldE on F;
  127. -- no check if NewE is split of OldE :)
  128. SectionEdgeFaces (me; SecE : Edge from TopoDS)
  129. returns ListOfShape from TopTools;
  130. ---C++: return const&
  131. ---Purpose: return faces cut by section edge
  132. --------------------
  133. ---Category: Private
  134. --------------------
  135. Inter3D (me: in out; F1, F2 : Face from TopoDS;
  136. LInt : in out ListOfShape from TopTools)
  137. is static private;
  138. StorePart3d(me : in out; F1,F2 : Face from TopoDS;
  139. LInt1 : ListOfShape from TopTools)
  140. is static private;
  141. SetDone(me : in out; F1,F2 : Face from TopoDS)
  142. is static private;
  143. Affiche (me; SetOfFaces : ListOfShape from TopTools)
  144. is static private;
  145. fields
  146. myAsDes : AsDes from BRepAlgo;
  147. myDone : DataMapOfShapeListOfShape from TopTools;
  148. myTouched : MapOfShape from TopTools;
  149. myNewEdges : MapOfShape from TopTools;
  150. -- section edges: existing edges that are intersection lines,
  151. -- may be partially.
  152. -- Store as
  153. -- FACE -> SECTION EDGES, SECTION EDGE -> OTHER SECTION EDGE
  154. mySectionEdgesAD : AsDes from BRepAlgo;
  155. -- same domain shapes
  156. -- faces
  157. mySameDomainFM : DataMapOfShapeListOfShape from TopTools;
  158. -- vertex -> vertex replacement
  159. mySameDomainVM : DataMapOfShapeShape from TopTools;
  160. end Inter3d;