Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
AdvancedEngine_PipeTShapeDriver.hxx
Go to the documentation of this file.
1 // Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 
20 #ifndef _AdvancedEngine_PipeTShapeDriver_HXX
21 #define _AdvancedEngine_PipeTShapeDriver_HXX
22 
23 #include "GEOM_BaseDriver.hxx"
24 #include "GEOMAlgo_State.hxx"
25 
26 #include <TopAbs_ShapeEnum.hxx>
27 #include <TopTools_HSequenceOfShape.hxx>
28 #include <TColStd_HSequenceOfInteger.hxx>
29 #include <Geom_Surface.hxx>
30 
32 
34 {
35 public:
36  // Methods PUBLIC
37  //
39  virtual Standard_Integer Execute(LOGBOOK& log) const;
40  virtual void Validate(LOGBOOK&) const {}
41  Standard_Boolean MustExecute(const LOGBOOK&) const { return Standard_True; }
42 
43  static const Standard_GUID& GetID();
45 
46  virtual bool GetCreationInformation(std::string& theOperationName,
47  std::vector<GEOM_Param>& params);
48  // Type management
49  //
51 private:
52 
63  TopoDS_Shape MakePipeTShape(double r1, double w1, double l1,
64  double r2, double w2, double l2) const;
65 
76  TopoDS_Shape MakeQuarterPipeTShape(double r1, double w1, double l1,
77  double r2, double w2, double l2) const;
78 
87  Handle(TColStd_HSequenceOfInteger)
88  GetShapesOnSurfaceIDs(const Handle(Geom_Surface)& theSurface,
89  const TopoDS_Shape& theShape,
90  TopAbs_ShapeEnum theShapeType,
91  GEOMAlgo_State theState) const;
92 
101  Handle(TColStd_HSequenceOfInteger)
102  GetShapesOnBoxIDs(const TopoDS_Shape& aBox,
103  const TopoDS_Shape& aShape,
104  const Standard_Integer theShapeType,
105  GEOMAlgo_State theState) const;
106 
107  //=======================================================================
108  //function : getCommonShapesOnCylinders
109  //purpose : return the common edge between 2 cylindrical surfaces
110  // along OX and OZ
111  //=======================================================================
112  void GetCommonShapesOnCylinders(const TopoDS_Shape& theShape,
113  TopAbs_ShapeEnum theShapeType,
114  double r, double r2,
115  Handle(TopTools_HSequenceOfShape)& commonShapes) const;
116 
117 };
118 
119 #endif // _AdvancedEngine_PipeTShapeDriver_HXX