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

7fd59977 | 1 | -- File: BRepBuilderAPI_FindPlane.cdl |

2 | -- Created: Thu Nov 2 11:36:39 1995 | |

3 | -- Author: Jing Cheng MEI | |

4 | -- <mei@junon> | |

5 | ---Copyright: Matra Datavision 1995 | |

6 | ||

7 | ||

8 | class FindPlane from BRepBuilderAPI | |

9 | ||

10 | ---Purpose: Describes functions to find the plane in which the edges | |

11 | -- of a given shape are located. | |

12 | -- A FindPlane object provides a framework for: | |

13 | -- - extracting the edges of a given shape, | |

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

15 | -- - consulting the result. | |

16 | ||

17 | uses | |

18 | ||

19 | Shape from TopoDS, | |

20 | Plane from Geom | |

21 | ||

22 | raises | |

23 | ||

24 | NoSuchObject from Standard | |

25 | ||

26 | is | |

27 | ||

28 | Create | |

29 | returns FindPlane from BRepBuilderAPI; | |

30 | ---Purpose: Initializes an empty algorithm. The function Init is then used to define the shape. | |

31 | ||

32 | Create (S : Shape from TopoDS; | |

33 | Tol : Real from Standard = -1) | |

34 | returns FindPlane from BRepBuilderAPI; | |

35 | ---Purpose: Constructs the plane containing the edges of the shape S. | |

36 | -- A plane is built only if all the edges are within a distance | |

37 | -- of less than or equal to tolerance from a planar surface. | |

38 | -- This tolerance value is equal to the larger of the following two values: | |

39 | -- - Tol, where the default value is negative, or | |

40 | -- - the largest of the tolerance values assigned to the individual edges of S. | |

41 | -- Use the function Found to verify that a plane is built. | |

42 | -- The resulting plane is then retrieved using the function Plane. | |

43 | ||

44 | Init (me : in out; | |

45 | S : Shape from TopoDS; | |

46 | Tol : Real from Standard = -1); | |

47 | ---Purpose: Constructs the plane containing the edges of the shape S. | |

48 | -- A plane is built only if all the edges are within a distance | |

49 | -- of less than or equal to tolerance from a planar surface. | |

50 | -- This tolerance value is equal to the larger of the following two values: | |

51 | -- - Tol, where the default value is negative, or | |

52 | -- - the largest of the tolerance values assigned to the individual edges of S. | |

53 | -- Use the function Found to verify that a plane is built. | |

54 | -- The resulting plane is then retrieved using the function Plane. | |

55 | ||

56 | Found(me) | |

57 | returns Boolean from Standard; | |

58 | ---Purpose: Returns true if a plane containing the edges of the | |

59 | -- shape is found and built. Use the function Plane to consult the result. | |

60 | Plane(me) | |

61 | returns mutable Plane from Geom; | |

62 | ---Purpose: Returns the plane containing the edges of the shape. | |

63 | -- Warning | |

64 | -- Use the function Found to verify that the plane is built. If | |

65 | -- a plane is not found, Plane returns a null handle. | |

66 | ||

67 | fields | |

68 | ||

69 | myPlane : Plane from Geom; | |

70 | ||

71 | end FindPlane; |