2 #ifndef HYDROData_Pipes_HeaderFile
3 #define HYDROData_Pipes_HeaderFile
5 #include <TopoDS_Vertex.hxx>
6 #include <TopoDS_Wire.hxx>
8 #include <TopTools_ListOfShape.hxx>
9 #include <ShapeUpgrade_UnifySameDomain.hxx>
11 class BRepOffsetAPI_MakePipeShell;
14 class HYDROData_Canal3dAnd2d
17 HYDROData_Canal3dAnd2d( const TopoDS_Wire& Profile,
18 const TopoDS_Wire& Guideline );
20 Standard_Boolean Create3dPresentation();
22 Standard_Boolean Create2dPresentation();
24 Standard_Boolean ProjectWireOntoXOY(const TopoDS_Wire& aWire,
25 TopoDS_Wire& ProjectedWire);
29 TopoDS_Vertex ProjectVertexOntoXOY(const TopoDS_Vertex& aVertex);
31 void SetMiddlePoint2d();
33 void SetMiddlePoint3d();
35 TopoDS_Wire SetTransformedProfile(const TopoDS_Wire& aProfile,
36 const TopoDS_Wire& aGuideline,
37 const gp_Pnt& aMiddlePoint);
39 TopoDS_Wire CreateWireOnUnifiedPipe2d(const TopoDS_Wire& aWireOnPipe2d);
41 TopoDS_Wire GetBank(const TopoDS_Vertex& aFreeVertex);
44 TopoDS_Shape Get3dPresentation();
45 TopoDS_Face Get2dPresentation();
46 TopoDS_Wire GetLeftBank();
47 TopoDS_Wire GetRightBank();
48 TopoDS_Wire GetInlet();
49 TopoDS_Wire GetOutlet();
50 Standard_Integer GetStatus();
52 void MakeSharpVertexList();
54 Standard_Boolean MakeFillet();
58 TopoDS_Wire myProfile;
59 TopoDS_Wire myGuideline;
60 TopoDS_Vertex myLeftVertex;
61 TopoDS_Vertex myRightVertex;
62 TopoDS_Vertex myLeftVertex2d;
63 TopoDS_Vertex myRightVertex2d;
64 gp_Pnt myMiddlePoint2d;
65 gp_Pnt myMiddlePoint3d;
67 TopoDS_Wire myProjectedProfile;
68 TopoDS_Wire myProjectedGuideline, myOriginalGuideline;
69 TopoDS_Wire myTransformedProfile3d;
70 TopoDS_Wire myTransformedProfile2d;
71 BRepOffsetAPI_MakePipeShell* mySweep3d;
72 BRepOffsetAPI_MakePipeShell* mySweep2d;
74 TopoDS_Shape myPipe3d;
75 TopoDS_Shape myPipe2d;
76 TopoDS_Shape myUnifiedPipe2d;
77 ShapeUpgrade_UnifySameDomain myUnifier;
80 //TopoDS_Shape myLeftBank;
81 //TopoDS_Shape myRightBank;
83 Standard_Integer myStatus;
85 //1 - some edges does not belong to same plane or parallel (fillet can not be build)
86 //2 - can not create fillet at some vertex with given radius: the length of some edge is too small respective to width of canal
87 //3 - fillet failed at some vertex
89 //5 - projection failed
93 Standard_Real myFilletRadius;
94 TopTools_ListOfShape mySharpVertexList;
95 Standard_Real myTolAngular;