865913c7615719a6f1bd1655a5ec815afceebbea
[occt.git] / src / IntPatch / IntPatch_WLineTool.hxx
1 // Copyright (c) 1999-2014 OPEN CASCADE SAS
2 //
3 // This file is part of Open CASCADE Technology software library.
4 //
5 // This library is free software; you can redistribute it and/or modify it under
6 // the terms of the GNU Lesser General Public License version 2.1 as published
7 // by the Free Software Foundation, with special exception defined in the file
8 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 // distribution for complete text of the license and disclaimer of any warranty.
10 //
11 // Alternatively, this file may be used under the terms of Open CASCADE
12 // commercial license or contractual agreement.
13
14 #ifndef _IntPatch_WLineTool_HeaderFile
15 #define _IntPatch_WLineTool_HeaderFile
16
17 #include <Standard_Boolean.hxx>
18 #include <Standard_Macro.hxx>
19 #include <IntPatch_WLine.hxx>
20 #include <IntPatch_SequenceOfLine.hxx>
21 #include <IntSurf_Quadric.hxx>
22 class TopoDS_Face;
23 class GeomAdaptor_HSurface;
24 class GeomInt_LineConstructor;
25 class IntTools_Context;
26 class Adaptor3d_TopolTool;
27 class Adaptor3d_HSurface;
28
29 //! IntPatch_WLineTool provides set of static methods related to walking lines.
30 class IntPatch_WLineTool
31 {
32 public:
33
34   DEFINE_STANDARD_ALLOC
35
36   //! I
37   //! Removes equal points (leave one of equal points) from theWLine
38   //! and recompute vertex parameters.
39   //!
40   //! II
41   //! Removes point out of borders in case of non periodic surfaces.
42   //!
43   //! III
44   //! Removes exceed points using tube criteria:
45   //! delete 7D point if it lies near to expected lines in 2d and 3d.
46   //! Each task (2d, 2d, 3d) have its own tolerance and checked separately.
47   //!
48   //! Returns new WLine or null WLine if the number
49   //! of the points is less than 2.
50   Standard_EXPORT static
51     Handle(IntPatch_WLine) ComputePurgedWLine(const Handle(IntPatch_WLine)       &theWLine,
52                                               const Handle(Adaptor3d_HSurface) &theS1,
53                                               const Handle(Adaptor3d_HSurface) &theS2,
54                                               const Handle(Adaptor3d_TopolTool)  &theDom1,
55                                               const Handle(Adaptor3d_TopolTool)  &theDom2);
56
57 //! Joins all WLines from theSlin to one if it is possible and records 
58 //! the result into theSlin again. Lines will be kept to be splitted if:
59 //! a) they are separated (has no common points);
60 //! b) resulted line (after joining) go through seam-edges or surface boundaries.
61 //!
62 //! In addition, if points in theSPnt lies at least in one of the line in theSlin,
63 //! this point will be deleted.
64   Standard_EXPORT static void JoinWLines(IntPatch_SequenceOfLine& theSlin,
65                                          IntPatch_SequenceOfPoint& theSPnt,
66                                          const Standard_Real theTol3D,
67                                          const Standard_Real theU1Period,
68                                          const Standard_Real theU2Period,
69                                          const Standard_Real theV1Period,
70                                          const Standard_Real theV2Period,
71                                          const Standard_Real theUfSurf1,
72                                          const Standard_Real theUlSurf1,
73                                          const Standard_Real theVfSurf1,
74                                          const Standard_Real theVlSurf1,
75                                          const Standard_Real theUfSurf2,
76                                          const Standard_Real theUlSurf2,
77                                          const Standard_Real theVfSurf2,
78                                          const Standard_Real theVlSurf2);
79
80
81 //! Extends every line from theSlin (if it is possible) to be started/finished
82 //! in strictly determined point (in the place of joint of two lines).
83 //! As result, some gaps between two lines will vanish.
84 //! The Walking lines are supposed (algorithm will do nothing for not-Walking line)
85 //! to be computed as a result of intersection of two quadrics.
86 //! The quadrics definition is accepted in input parameters.
87   Standard_EXPORT static void ExtendTwoWlinesToEachOther(IntPatch_SequenceOfLine& theSlin,
88                                                          const IntSurf_Quadric& theS1,
89                                                          const IntSurf_Quadric& theS2,
90                                                          const Standard_Real theToler3D,
91                                                          const Standard_Real theU1Period,
92                                                          const Standard_Real theU2Period,
93                                                          const Standard_Real theV1Period,
94                                                          const Standard_Real theV2Period,
95                                                          const Bnd_Box2d& theBoxS1,
96                                                          const Bnd_Box2d& theBoxS2);
97 };
98
99 #endif