4e14c88f |
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> |
eee615ad |
21 | #include <IntSurf_Quadric.hxx> |
4e14c88f |
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. |
5185b161 |
42 | //! This step is done only if theRestrictLine is true. |
4e14c88f |
43 | //! |
44 | //! III |
45 | //! Removes exceed points using tube criteria: |
46 | //! delete 7D point if it lies near to expected lines in 2d and 3d. |
47 | //! Each task (2d, 2d, 3d) have its own tolerance and checked separately. |
48 | //! |
49 | //! Returns new WLine or null WLine if the number |
50 | //! of the points is less than 2. |
51 | Standard_EXPORT static |
52 | Handle(IntPatch_WLine) ComputePurgedWLine(const Handle(IntPatch_WLine) &theWLine, |
53 | const Handle(Adaptor3d_HSurface) &theS1, |
54 | const Handle(Adaptor3d_HSurface) &theS2, |
55 | const Handle(Adaptor3d_TopolTool) &theDom1, |
5185b161 |
56 | const Handle(Adaptor3d_TopolTool) &theDom2, |
57 | const Standard_Boolean theRestrictLine); |
4e14c88f |
58 | |
59 | //! Joins all WLines from theSlin to one if it is possible and records |
60 | //! the result into theSlin again. Lines will be kept to be splitted if: |
61 | //! a) they are separated (has no common points); |
62 | //! b) resulted line (after joining) go through seam-edges or surface boundaries. |
63 | //! |
64 | //! In addition, if points in theSPnt lies at least in one of the line in theSlin, |
65 | //! this point will be deleted. |
66 | Standard_EXPORT static void JoinWLines(IntPatch_SequenceOfLine& theSlin, |
67 | IntPatch_SequenceOfPoint& theSPnt, |
68 | const Standard_Real theTol3D, |
69 | const Standard_Real theU1Period, |
70 | const Standard_Real theU2Period, |
71 | const Standard_Real theV1Period, |
72 | const Standard_Real theV2Period, |
73 | const Standard_Real theUfSurf1, |
74 | const Standard_Real theUlSurf1, |
75 | const Standard_Real theVfSurf1, |
76 | const Standard_Real theVlSurf1, |
77 | const Standard_Real theUfSurf2, |
78 | const Standard_Real theUlSurf2, |
79 | const Standard_Real theVfSurf2, |
80 | const Standard_Real theVlSurf2); |
81 | |
eee615ad |
82 | |
b8f67cc2 |
83 | //! Extends every line from theSlin (if it is possible) to be started/finished |
84 | //! in strictly determined point (in the place of joint of two lines). |
85 | //! As result, some gaps between two lines will vanish. |
eee615ad |
86 | //! The Walking lines are supposed (algorithm will do nothing for not-Walking line) |
87 | //! to be computed as a result of intersection of two quadrics. |
88 | //! The quadrics definition is accepted in input parameters. |
89 | Standard_EXPORT static void ExtendTwoWlinesToEachOther(IntPatch_SequenceOfLine& theSlin, |
90 | const IntSurf_Quadric& theS1, |
91 | const IntSurf_Quadric& theS2, |
92 | const Standard_Real theToler3D, |
93 | const Standard_Real theU1Period, |
94 | const Standard_Real theU2Period, |
95 | const Standard_Real theV1Period, |
b8f67cc2 |
96 | const Standard_Real theV2Period, |
97 | const Bnd_Box2d& theBoxS1, |
98 | const Bnd_Box2d& theBoxS2); |
d30895f5 |
99 | |
100 | //! Max angle to concatenate two WLines to avoid result with C0-continuity |
101 | static const Standard_Real myMaxConcatAngle; |
4e14c88f |
102 | }; |
103 | |
104 | #endif |