42cf5bc1 |
1 | // Created on: 2004-07-14 |
2 | // Created by: Sergey KUUL |
3 | // Copyright (c) 2004-2014 OPEN CASCADE SAS |
4 | // |
5 | // This file is part of Open CASCADE Technology software library. |
6 | // |
7 | // This library is free software; you can redistribute it and/or modify it under |
8 | // the terms of the GNU Lesser General Public License version 2.1 as published |
9 | // by the Free Software Foundation, with special exception defined in the file |
10 | // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
11 | // distribution for complete text of the license and disclaimer of any warranty. |
12 | // |
13 | // Alternatively, this file may be used under the terms of Open CASCADE |
14 | // commercial license or contractual agreement. |
15 | |
16 | #ifndef _ShapeFix_SplitTool_HeaderFile |
17 | #define _ShapeFix_SplitTool_HeaderFile |
18 | |
19 | #include <Standard.hxx> |
20 | #include <Standard_DefineAlloc.hxx> |
21 | #include <Standard_Handle.hxx> |
22 | |
23 | #include <Standard_Boolean.hxx> |
24 | #include <Standard_Real.hxx> |
25 | #include <TopTools_SequenceOfShape.hxx> |
26 | #include <Standard_Integer.hxx> |
27 | class TopoDS_Edge; |
28 | class TopoDS_Vertex; |
29 | class TopoDS_Face; |
30 | class ShapeBuild_ReShape; |
31 | |
32 | |
33 | //! Tool for splitting and cutting edges; includes methods |
34 | //! used in OverlappingTool and IntersectionTool |
35 | class ShapeFix_SplitTool |
36 | { |
37 | public: |
38 | |
39 | DEFINE_STANDARD_ALLOC |
40 | |
41 | |
42 | //! Empty constructor |
43 | Standard_EXPORT ShapeFix_SplitTool(); |
44 | |
45 | //! Split edge on two new edges using new vertex "vert" |
46 | //! and "param" - parameter for splitting |
47 | //! The "face" is necessary for pcurves and using TransferParameterProj |
48 | Standard_EXPORT Standard_Boolean SplitEdge (const TopoDS_Edge& edge, const Standard_Real param, const TopoDS_Vertex& vert, const TopoDS_Face& face, TopoDS_Edge& newE1, TopoDS_Edge& newE2, const Standard_Real tol3d, const Standard_Real tol2d) const; |
49 | |
50 | //! Split edge on two new edges using new vertex "vert" |
51 | //! and "param1" and "param2" - parameter for splitting and cutting |
52 | //! The "face" is necessary for pcurves and using TransferParameterProj |
53 | Standard_EXPORT Standard_Boolean SplitEdge (const TopoDS_Edge& edge, const Standard_Real param1, const Standard_Real param2, const TopoDS_Vertex& vert, const TopoDS_Face& face, TopoDS_Edge& newE1, TopoDS_Edge& newE2, const Standard_Real tol3d, const Standard_Real tol2d) const; |
54 | |
55 | //! Cut edge by parameters pend and cut |
56 | Standard_EXPORT Standard_Boolean CutEdge (const TopoDS_Edge& edge, const Standard_Real pend, const Standard_Real cut, const TopoDS_Face& face, Standard_Boolean& iscutline) const; |
57 | |
58 | //! Split edge on two new edges using two new vertex V1 and V2 |
59 | //! and two parameters for splitting - fp and lp correspondingly |
60 | //! The "face" is necessary for pcurves and using TransferParameterProj |
61 | //! aNum - number of edge in SeqE which corresponding to [fp,lp] |
62 | Standard_EXPORT Standard_Boolean SplitEdge (const TopoDS_Edge& edge, const Standard_Real fp, const TopoDS_Vertex& V1, const Standard_Real lp, const TopoDS_Vertex& V2, const TopoDS_Face& face, TopTools_SequenceOfShape& SeqE, Standard_Integer& aNum, const Handle(ShapeBuild_ReShape)& context, const Standard_Real tol3d, const Standard_Real tol2d) const; |
63 | |
64 | |
65 | |
66 | |
67 | protected: |
68 | |
69 | |
70 | |
71 | |
72 | |
73 | private: |
74 | |
75 | |
76 | |
77 | |
78 | |
79 | }; |
80 | |
81 | |
82 | |
83 | |
84 | |
85 | |
86 | |
87 | #endif // _ShapeFix_SplitTool_HeaderFile |