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

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

2 | -- Created: Mon Dec 30 17:10:14 1996 | |

3 | -- Author: Stagiaire Mary FABIEN | |

4 | -- <fbi@zozox.paris1.matra-dtv.fr> | |

5 | ---Copyright: Matra Datavision 1996 | |

6 | ||

7 | class GTransform from BRepBuilderAPI inherits ModifyShape from BRepBuilderAPI | |

8 | ||

9 | ---Purpose: Geometric transformation on a shape. | |

10 | -- The transformation to be applied is defined as a gp_GTrsf | |

11 | -- transformation. It may be: | |

12 | -- - a transformation equivalent to a gp_Trsf transformation, the | |

13 | -- most common case: you should , however, use a BRepAPI_Transform | |

14 | -- object to perform this kind of transformation; or | |

15 | -- - an affinity, or | |

16 | -- - more generally, any type of point transformation which may | |

17 | -- be defined by a three row, four column matrix of transformation. | |

18 | -- In the last two cases, the underlying geometry of the | |

19 | -- following shapes may change: | |

20 | -- - a curve which supports an edge of the shape, or | |

21 | -- - a surface which supports a face of the shape; | |

22 | -- For example, a circle may be transformed into an ellipse when | |

23 | -- applying an affinity transformation. | |

24 | -- The transformation is applied to: | |

25 | -- - all the curves which support edges of the shape, and | |

26 | -- - all the surfaces which support faces of the shape. | |

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

28 | -- - defining the geometric transformation to be applied, | |

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

30 | -- - consulting the result. | |

31 | ||

32 | ||

33 | ||

34 | uses | |

35 | Trsf from gp, | |

36 | GTrsf from gp, | |

37 | Shape from TopoDS, | |

38 | Face from TopoDS, | |

39 | Collect from BRepBuilderAPI, | |

40 | ShapeModification from BRepBuilderAPI, | |

41 | ListOfShape from TopTools | |

42 | ||

43 | -- Modified by Sergey KHROMOV - Thu Mar 27 17:45:42 2003 Begin | |

44 | raises | |

45 | NoSuchObject from Standard | |

46 | ||

47 | -- Modified by Sergey KHROMOV - Thu Mar 27 17:45:42 2003 End | |

48 | is | |

49 | ||

50 | Create(T: GTrsf from gp) | |

51 | ||

52 | returns GTransform from BRepBuilderAPI; | |

53 | ---Purpose: Constructs a framework for applying the geometric | |

54 | -- transformation T to a shape. Use the function | |

55 | -- Perform to define the shape to transform. | |

56 | ||

57 | ||

58 | Create(S: Shape from TopoDS; T: GTrsf from gp; | |

59 | Copy: Boolean from Standard = Standard_False) | |

60 | ||

61 | returns GTransform from BRepBuilderAPI; | |

62 | ---Purpose: Constructs a framework for applying the geometric | |

63 | -- transformation T to a shape, and applies it to the shape S. | |

64 | -- - If the transformation T is direct and isometric (i.e. if | |

65 | -- the determinant of the vectorial part of T is equal to | |

66 | -- 1.), and if Copy equals false (default value), the | |

67 | -- resulting shape is the same as the original but with | |

68 | -- a new location assigned to it. | |

69 | -- - In all other cases, the transformation is applied to | |

70 | -- a duplicate of S. | |

71 | -- Use the function Shape to access the result. | |

72 | -- Note: the constructed framework can be reused to | |

73 | -- apply the same geometric transformation to other | |

74 | -- shapes: just specify them with the function Perform. | |

75 | ||

76 | ||

77 | Perform(me: in out; S : Shape from TopoDS; | |

78 | Copy: Boolean from Standard = Standard_False) | |

79 | ||

80 | ---Purpose: Applies the geometric transformation defined at the | |

81 | -- time of construction of this framework to the shape S. | |

82 | -- - If the transformation T is direct and isometric (i.e. if | |

83 | -- the determinant of the vectorial part of T is equal to | |

84 | -- 1.), and if Copy equals false (default value), the | |

85 | -- resulting shape is the same as the original but with | |

86 | -- a new location assigned to it. | |

87 | -- - In all other cases, the transformation is applied to a duplicate of S. | |

88 | -- Use the function Shape to access the result. | |

89 | -- Note: this framework can be reused to apply the same | |

90 | -- geometric transformation to other shapes: just specify | |

91 | -- them by calling the function Perform again. | |

92 | ||

93 | is static; | |

94 | ||

95 | Modified (me: in out; S : Shape from TopoDS) | |

96 | ---Purpose: Returns the list of shapes modified from the shape | |

97 | -- <S>. | |

98 | ---C++: return const & | |

99 | ---Level: Public | |

100 | returns ListOfShape from TopTools | |

101 | is redefined virtual; | |

102 | ||

103 | -- Modified by Sergey KHROMOV - Thu Mar 27 17:43:59 2003 Begin | |

104 | ModifiedShape(me; S: Shape from TopoDS) | |

105 | returns Shape from TopoDS | |

106 | ---Purpose: Returns the modified shape corresponding to <S>. | |

107 | ---C++: return const& | |

108 | raises NoSuchObject from Standard | |

109 | -- if S is not the initial shape or a sub-shape | |

110 | -- of the initial shape. | |

111 | is redefined virtual; | |

112 | -- Modified by Sergey KHROMOV - Thu Mar 27 17:44:02 2003 End | |

113 | ||

114 | fields | |

115 | ||

116 | myGTrsf : GTrsf from gp; | |

117 | myUseModif : Boolean from Standard; | |

118 | myHist : Collect from BRepBuilderAPI; | |

119 | ||

120 | end Transform; |