b311480e |
1 | -- Created on: 1992-10-19 |
2 | -- Created by: Remi GILET |
3 | -- Copyright (c) 1992-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
7 | -- |
d5f74e42 |
8 | -- This library is free software; you can redistribute it and/or modify it under |
9 | -- the terms of the GNU Lesser General Public License version 2.1 as published |
973c2be1 |
10 | -- by the Free Software Foundation, with special exception defined in the file |
11 | -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT |
12 | -- distribution for complete text of the license and disclaimer of any warranty. |
b311480e |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | class Bisec from Bisector |
18 | |
19 | --- Purpose : Bisec provides the bisecting line between two elements |
20 | -- This line is trimed by a point <P> and it's contained in the domain |
21 | -- defined by the two vectors <V1>, <V2> and <Sense>. |
22 | -- |
23 | -- Definition of the domain: |
24 | -- if <Sense> is true the bisecting line is contained in the sector |
25 | -- defined by <-V1> and <-V2> in the sense indirect. |
26 | -- if <Sense> is false the bisecting line is contained in the sector |
27 | -- defined by <-V1> and <-V2> in the sense direct. |
28 | -- |
29 | -- <Tolerance> is used to define degenerate bisector. |
30 | -- if the bisector is an hyperbola and one of this radius is smaller |
31 | -- than <Tolerance>, the bisector is replaced by a line or semi_line |
32 | -- corresponding to one of hyperbola's axes. |
33 | -- if the bisector is a parabola on the focal length is smaller than |
34 | -- <Tolerance>, the bisector is replaced by a semi_line corresponding |
35 | -- to the axe of symetrie of the parabola. |
36 | -- if the bisector is an ellipse and the minor radius is smaller than |
37 | -- <Tolerance>, the bisector is replaced by a segment corresponding |
38 | -- to the great axe of the ellipse. |
39 | |
40 | uses |
41 | |
42 | TrimmedCurve from Geom2d , |
43 | Curve from Geom2d , |
44 | Curve from Bisector, |
45 | Point from Geom2d , |
46 | Pnt2d from gp , |
47 | Vec2d from gp , |
9eb68d38 |
48 | Integer from Standard, |
49 | JoinType from GeomAbs |
7fd59977 |
50 | |
51 | is |
52 | Create returns Bisec from Bisector; |
53 | |
54 | Perform(me : in out ; |
9eb68d38 |
55 | Cu1 : Curve from Geom2d ; |
56 | Cu2 : Curve from Geom2d ; |
57 | P : Pnt2d from gp ; |
58 | V1 : Vec2d from gp ; |
59 | V2 : Vec2d from gp ; |
60 | Sense : Real from Standard ; |
61 | ajointype : JoinType from GeomAbs ; |
62 | Tolerance : Real from Standard ; |
63 | oncurve : Boolean from Standard = Standard_True ); |
7fd59977 |
64 | |
65 | --- Purpose : Performs the bisecting line between the curves |
66 | -- <Cu1> and <Cu2>. |
67 | -- <oncurve> is True if the point <P> is common to <Cu1> |
68 | -- and <Cu2>. |
69 | |
70 | Perform(me : in out ; |
71 | Cu : Curve from Geom2d ; |
72 | Pnt : Point from Geom2d ; |
73 | P : Pnt2d from gp ; |
74 | V1 : Vec2d from gp ; |
75 | V2 : Vec2d from gp ; |
76 | Sense : Real from Standard ; |
77 | Tolerance : Real from Standard ; |
78 | oncurve : Boolean from Standard = Standard_True); |
79 | |
80 | --- Purpose : Performs the bisecting line between the curve |
81 | -- <Cu1> and the point <Pnt>. |
82 | -- <oncurve> is True if the point <P> is the point <Pnt>. |
83 | |
84 | Perform(me : in out ; |
85 | Pnt : Point from Geom2d ; |
86 | Cu : Curve from Geom2d ; |
87 | P : Pnt2d from gp ; |
88 | V1 : Vec2d from gp ; |
89 | V2 : Vec2d from gp ; |
90 | Sense : Real from Standard ; |
91 | Tolerance : Real from Standard ; |
92 | oncurve : Boolean from Standard = Standard_True ); |
93 | |
94 | --- Purpose : Performs the bisecting line between the curve |
95 | -- <Cu> and the point <Pnt>. |
96 | -- <oncurve> is True if the point <P> is the point <Pnt>. |
97 | |
98 | Perform(me : in out ; |
99 | Pnt1 : Point from Geom2d ; |
100 | Pnt2 : Point from Geom2d ; |
101 | P : Pnt2d from gp ; |
102 | V1 : Vec2d from gp ; |
103 | V2 : Vec2d from gp ; |
104 | Sense : Real from Standard ; |
105 | Tolerance : Real from Standard = 0.0 ; |
106 | oncurve : Boolean from Standard = Standard_True ) ; |
107 | |
108 | --- Purpose : Performs the bisecting line between the two points |
109 | -- <Pnt1> and <Pnt2>. |
110 | |
111 | |
112 | Value(me) returns TrimmedCurve from Geom2d |
113 | --- Purpose : Returns the Curve of <me>. |
114 | ---C++: return const & |
115 | is static; |
116 | |
6e33d3ce |
117 | ChangeValue (me : in out) returns TrimmedCurve from Geom2d |
7fd59977 |
118 | --- Purpose : Returns the Curve of <me>. |
119 | -- |
120 | ---C++: return const & |
121 | is static; |
122 | |
123 | fields |
124 | |
125 | thebisector : TrimmedCurve from Geom2d; |
126 | |
127 | end Bisec; |
128 | |
129 | |