Commit | Line | Data |
---|---|---|

b311480e | 1 | -- Created on: 1991-04-03 |

2 | -- Created by: Remi GILET | |

3 | -- Copyright (c) 1991-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 | -- |

973c2be1 | 8 | -- This library is free software; you can redistribute it and / or modify it |

9 | -- under the terms of the GNU Lesser General Public version 2.1 as published | |

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 CircLin2dBisec | |

18 | ||

19 | from GccAna | |

20 | ||

21 | ---Purpose: Describes functions for building bisecting curves between a 2D line and a 2D circle. | |

22 | -- A bisecting curve between a circle and a line is a curve | |

23 | -- such that each of its points is at the same distance from | |

24 | -- the circle and the line. It can be a parabola or a line, | |

25 | -- depending of the relative position of the line and the | |

26 | -- circle. The algorithm computes all the elementary curves which are solutions. | |

27 | -- A CircLin2dBisec object provides a framework for: | |

28 | -- - defining the construction of the bisecting curves, | |

29 | -- - implementing the construction algorithm, and | |

30 | -- - consulting the result. | |

31 | ||

32 | ||

33 | uses Lin2d from gp, | |

34 | Circ2d from gp, | |

35 | Bisec from GccInt | |

36 | ||

37 | raises OutOfRange from Standard, | |

38 | NotDone from StdFail | |

39 | ||

40 | is | |

41 | ||

42 | Create(Circle : Circ2d from gp; | |

43 | Line : Lin2d from gp) returns CircLin2dBisec; | |

44 | ||

45 | ---Purpose: Constructs bisecting curves between the circle Circle and the line Line. | |

46 | ||

47 | IsDone(me) returns Boolean from Standard | |

48 | is static; | |

49 | ||

50 | --- Purpose: Returns true (this construction algorithm never fails). | |

51 | ||

52 | NbSolutions(me) returns Integer from Standard | |

53 | raises NotDone | |

54 | is static; | |

55 | ---Purpose: | |

56 | -- Returns the number of curves, representing solutions computed by this algorithm. | |

57 | ||

58 | ThisSolution(me ; | |

59 | Index : Integer from Standard) returns Bisec from GccInt | |

60 | raises OutOfRange, NotDone | |

61 | is static; | |

62 | ---Purpose : Returns the solution number Index and raises OutOfRange | |

63 | -- exception if Index is greater than the number of solutions | |

64 | -- Exceptions | |

65 | -- Standard_OutOfRange if Index is less than zero or | |

66 | -- greater than the number of solutions computed by this algorithm. | |

67 | ||

68 | fields | |

69 | ||

70 | WellDone : Boolean from Standard; | |

71 | ---Purpose: True if the algorithm succeeded. | |

72 | ||

73 | NbrSol : Integer from Standard; | |

74 | ---Purpose: The number of possible solutions. We have to decide about the | |

75 | -- status of the multiple solutions... | |

76 | ||

77 | circle : Circ2d from gp; | |

78 | ---Purpose: The first argument used for ThisSolution. | |

79 | ||

80 | line : Lin2d from gp; | |

81 | ---Purpose: The second argument used for ThisSolution. | |

82 | ||

83 | end CircLin2dBisec; |