e2e0498b |
1 | //! Created on: 2016-06-03 |
2 | //! Created by: NIKOLAI BUKHALOV |
3 | //! Copyright (c) 2016 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 _IntPatch_SpecialPoints_HeaderFile |
17 | #define _IntPatch_SpecialPoints_HeaderFile |
18 | |
19 | //! Contains methods to add some special points |
20 | //! (such as apex of cone, pole of sphere, |
21 | //! point on surface boundary etc.) in the intersection line. |
22 | |
23 | #include <IntPatch_SpecPntType.hxx> |
24 | #include <Standard_Handle.hxx> |
25 | |
26 | class Adaptor3d_HSurface; |
27 | class IntPatch_Point; |
28 | class IntSurf_PntOn2S; |
29 | class math_Vector; |
30 | |
31 | class IntPatch_SpecialPoints |
32 | { |
33 | public: |
34 | //! Adds the point defined as intersection |
35 | //! of two isolines (U = 0 and V = 0) on theQSurf in theLine. |
36 | //! theRefPt is used to correct adjusting parameters. |
37 | //! If theIsReversed is TRUE then theQSurf correspond to the |
38 | //! second (otherwise, the first) surface while forming |
39 | //! intersection point IntSurf_PntOn2S. |
40 | Standard_EXPORT static Standard_Boolean |
41 | AddCrossUVIsoPoint(const Handle(Adaptor3d_HSurface)& theQSurf, |
42 | const Handle(Adaptor3d_HSurface)& thePSurf, |
43 | const IntSurf_PntOn2S& theRefPt, |
44 | const Standard_Real theTol3d, |
45 | IntSurf_PntOn2S& theAddedPoint, |
46 | const Standard_Boolean theIsReversed |
47 | = Standard_False); |
48 | |
49 | //! Adds the point lain strictly in the isoline U = 0 or V = 0 of theQSurf, |
50 | //! in theLine. |
51 | //! theRefPt is used to correct adjusting parameters. |
52 | //! If theIsReversed is TRUE then theQSurf corresponds to the |
53 | //! second (otherwise, the first) surface while forming |
54 | //! intersection point IntSurf_PntOn2S. |
55 | Standard_EXPORT static Standard_Boolean |
56 | AddPointOnUorVIso(const Handle(Adaptor3d_HSurface)& theQSurf, |
57 | const Handle(Adaptor3d_HSurface)& thePSurf, |
58 | const IntSurf_PntOn2S& theRefPt, |
59 | const Standard_Boolean theIsU, |
60 | const math_Vector& theToler, |
61 | const math_Vector& theInitPoint, |
62 | const math_Vector& theInfBound, |
63 | const math_Vector& theSupBound, |
64 | IntSurf_PntOn2S& theAddedPoint, |
65 | const Standard_Boolean theIsReversed |
66 | = Standard_False); |
67 | |
68 | //! Computes the pole of sphere to add it in the intersection line. |
69 | //! Stores the result in theAddedPoint variable (does not add in the line). |
70 | //! At that, cone and sphere (with singularity) must be set in theQSurf parameter. |
71 | //! By default (if theIsReversed == FALSE), theQSurf is the first surface of the |
72 | //! Walking line. If it is not, theIsReversed parameter must be set to TRUE. |
73 | //! theIsReqRefCheck is TRUE if and only if 3D-point of theRefPt must be pole or apex |
74 | //! for check (e.g. if it is vertex). |
75 | //! thePtIso is the reference point for obtaining isoline where must be placed the Apex/Pole. |
76 | //! |
77 | //! ATTENTION!!! |
78 | //! theVertex must be initialized before calling the method . |
79 | Standard_EXPORT static Standard_Boolean |
80 | AddSingularPole(const Handle(Adaptor3d_HSurface)& theQSurf, |
81 | const Handle(Adaptor3d_HSurface)& thePSurf, |
82 | const IntSurf_PntOn2S& thePtIso, |
83 | const Standard_Real theTol3d, |
84 | IntPatch_Point& theVertex, |
85 | IntSurf_PntOn2S& theAddedPoint, |
86 | const Standard_Boolean theIsReversed = |
87 | Standard_False, |
88 | const Standard_Boolean theIsReqRefCheck = |
89 | Standard_False); |
90 | |
91 | //! Special point has already been added in the line. Now, we need in correct |
92 | //! prolongation of the line or in start new line. This function returns new point. |
93 | //! |
94 | //! ATTENTION!!! |
95 | //! theNewPoint is not only Output parameter. It is Input/Output one. I.e. |
96 | //! theNewPoint is reference point together with theRefPt. |
97 | Standard_EXPORT static Standard_Boolean |
98 | ContinueAfterSpecialPoint(const Handle(Adaptor3d_HSurface)& theQSurf, |
99 | const Handle(Adaptor3d_HSurface)& thePSurf, |
100 | const IntSurf_PntOn2S& theRefPt, |
101 | const IntPatch_SpecPntType theSPType, |
102 | const Standard_Real theTol2D, |
103 | IntSurf_PntOn2S& theNewPoint, |
104 | const Standard_Boolean theIsReversed |
105 | = Standard_False); |
106 | |
107 | //! Sets theNewPoint parameters in 2D-space the closest to |
108 | //! theRefPoint with help of adding/subtracting corresponding periods. |
109 | //! theArrPeriods must be filled as follows: |
110 | //! {<U-period of 1st surface>, <V-period of 1st surface>, |
111 | //! <U-period of 2nd surface>, <V-period of 2nd surface>}. |
112 | //! If theVertex != 0 then its parameters will befilled as |
113 | //! corresponding parameters of theNewPoint. |
114 | //! |
115 | //! ATTENTION!!! |
116 | //! theNewPoint is not only Output parameter. It is Input/Output one. I.e. |
117 | //! theNewPoint is reference point together with theRefPt. |
118 | Standard_EXPORT static void |
119 | AdjustPointAndVertex(const IntSurf_PntOn2S &theRefPoint, |
120 | const Standard_Real theArrPeriods[4], |
121 | IntSurf_PntOn2S &theNewPoint, |
122 | IntPatch_Point* const theVertex = 0); |
123 | }; |
124 | |
125 | #endif // _IntPatch_AddSpecialPoints_HeaderFile |