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 | |
261b7d9e |
17 | #include <Standard_DefineAlloc.hxx> |
18 | |
4e14c88f |
19 | #include <IntPatch_SequenceOfLine.hxx> |
e2e0498b |
20 | #include <IntPatch_WLine.hxx> |
3306fdd9 |
21 | #include <NCollection_List.hxx> |
e2e0498b |
22 | |
4e14c88f |
23 | class Adaptor3d_TopolTool; |
4e14c88f |
24 | |
25 | //! IntPatch_WLineTool provides set of static methods related to walking lines. |
26 | class IntPatch_WLineTool |
27 | { |
28 | public: |
29 | |
30 | DEFINE_STANDARD_ALLOC |
31 | |
32 | //! I |
33 | //! Removes equal points (leave one of equal points) from theWLine |
34 | //! and recompute vertex parameters. |
35 | //! |
36 | //! II |
37 | //! Removes point out of borders in case of non periodic surfaces. |
38 | //! |
39 | //! III |
40 | //! Removes exceed points using tube criteria: |
41 | //! delete 7D point if it lies near to expected lines in 2d and 3d. |
42 | //! Each task (2d, 2d, 3d) have its own tolerance and checked separately. |
43 | //! |
44 | //! Returns new WLine or null WLine if the number |
45 | //! of the points is less than 2. |
46 | Standard_EXPORT static |
47 | Handle(IntPatch_WLine) ComputePurgedWLine(const Handle(IntPatch_WLine) &theWLine, |
48 | const Handle(Adaptor3d_HSurface) &theS1, |
49 | const Handle(Adaptor3d_HSurface) &theS2, |
50 | const Handle(Adaptor3d_TopolTool) &theDom1, |
7797eb38 |
51 | const Handle(Adaptor3d_TopolTool) &theDom2); |
4e14c88f |
52 | |
3306fdd9 |
53 | //! Joins all WLines from theSlin to one if it is possible and records |
54 | //! the result into theSlin again. Lines will be kept to be split if: |
55 | //! a) they are separated (has no common points); |
56 | //! b) resulted line (after joining) go through seam-edges or surface boundaries. |
57 | //! |
58 | //! In addition, if points in theSPnt lies at least in one of the line in theSlin, |
59 | //! this point will be deleted. |
4e14c88f |
60 | Standard_EXPORT static void JoinWLines(IntPatch_SequenceOfLine& theSlin, |
61 | IntPatch_SequenceOfPoint& theSPnt, |
261b7d9e |
62 | Handle(Adaptor3d_HSurface) theS1, |
63 | Handle(Adaptor3d_HSurface) theS2, |
64 | const Standard_Real theTol3D); |
eee615ad |
65 | |
3306fdd9 |
66 | //! Extends every line from theSlin (if it is possible) to be started/finished |
67 | //! in strictly determined point (in the place of joint of two lines). |
68 | //! As result, some gaps between two lines will vanish. |
69 | //! The Walking lines are supposed (algorithm will do nothing for not-Walking line) |
70 | //! to be computed as a result of intersection. Both theS1 and theS2 |
71 | //! must be quadrics. Other cases are not supported. |
72 | //! theArrPeriods must be filled as follows (every value must not be negative; |
73 | //! if the surface is not periodic the period must be equal to 0.0 strictly): |
74 | //! {<U-period of 1st surface>, <V-period of 1st surface>, |
75 | //! <U-period of 2nd surface>, <V-period of 2nd surface>}. |
76 | //! theListOfCriticalPoints must contain 3D-points where joining is disabled. |
e2e0498b |
77 | Standard_EXPORT static void |
78 | ExtendTwoWLines(IntPatch_SequenceOfLine& theSlin, |
79 | const Handle(Adaptor3d_HSurface)& theS1, |
80 | const Handle(Adaptor3d_HSurface)& theS2, |
81 | const Standard_Real theToler3D, |
82 | const Standard_Real* const theArrPeriods, |
83 | const Bnd_Box2d& theBoxS1, |
3306fdd9 |
84 | const Bnd_Box2d& theBoxS2, |
85 | const NCollection_List<gp_Pnt>& theListOfCriticalPoints); |
d30895f5 |
86 | |
e2e0498b |
87 | //! Max angle to concatenate two WLines to avoid result with C0-continuity |
d30895f5 |
88 | static const Standard_Real myMaxConcatAngle; |
4e14c88f |
89 | }; |
90 | |
91 | #endif |