1 -- Created on: 1996-12-30
2 -- Created by: Stagiaire Mary FABIEN
3 -- Copyright (c) 1996-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
6 -- This file is part of Open CASCADE Technology software library.
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
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class GTransform from BRepBuilderAPI inherits ModifyShape from BRepBuilderAPI
19 ---Purpose: Geometric transformation on a shape.
20 -- The transformation to be applied is defined as a gp_GTrsf
21 -- transformation. It may be:
22 -- - a transformation equivalent to a gp_Trsf transformation, the
23 -- most common case: you should , however, use a BRepAPI_Transform
24 -- object to perform this kind of transformation; or
26 -- - more generally, any type of point transformation which may
27 -- be defined by a three row, four column matrix of transformation.
28 -- In the last two cases, the underlying geometry of the
29 -- following shapes may change:
30 -- - a curve which supports an edge of the shape, or
31 -- - a surface which supports a face of the shape;
32 -- For example, a circle may be transformed into an ellipse when
33 -- applying an affinity transformation.
34 -- The transformation is applied to:
35 -- - all the curves which support edges of the shape, and
36 -- - all the surfaces which support faces of the shape.
37 -- A GTransform object provides a framework for:
38 -- - defining the geometric transformation to be applied,
39 -- - implementing the transformation algorithm, and
40 -- - consulting the result.
49 Collect from BRepBuilderAPI,
50 ShapeModification from BRepBuilderAPI,
51 ListOfShape from TopTools
53 -- Modified by Sergey KHROMOV - Thu Mar 27 17:45:42 2003 Begin
55 NoSuchObject from Standard
57 -- Modified by Sergey KHROMOV - Thu Mar 27 17:45:42 2003 End
60 Create(T: GTrsf from gp)
62 returns GTransform from BRepBuilderAPI;
63 ---Purpose: Constructs a framework for applying the geometric
64 -- transformation T to a shape. Use the function
65 -- Perform to define the shape to transform.
68 Create(S: Shape from TopoDS; T: GTrsf from gp;
69 Copy: Boolean from Standard = Standard_False)
71 returns GTransform from BRepBuilderAPI;
72 ---Purpose: Constructs a framework for applying the geometric
73 -- transformation T to a shape, and applies it to the shape S.
74 -- - If the transformation T is direct and isometric (i.e. if
75 -- the determinant of the vectorial part of T is equal to
76 -- 1.), and if Copy equals false (default value), the
77 -- resulting shape is the same as the original but with
78 -- a new location assigned to it.
79 -- - In all other cases, the transformation is applied to
81 -- Use the function Shape to access the result.
82 -- Note: the constructed framework can be reused to
83 -- apply the same geometric transformation to other
84 -- shapes: just specify them with the function Perform.
87 Perform(me: in out; S : Shape from TopoDS;
88 Copy: Boolean from Standard = Standard_False)
90 ---Purpose: Applies the geometric transformation defined at the
91 -- time of construction of this framework to the shape S.
92 -- - If the transformation T is direct and isometric (i.e. if
93 -- the determinant of the vectorial part of T is equal to
94 -- 1.), and if Copy equals false (default value), the
95 -- resulting shape is the same as the original but with
96 -- a new location assigned to it.
97 -- - In all other cases, the transformation is applied to a duplicate of S.
98 -- Use the function Shape to access the result.
99 -- Note: this framework can be reused to apply the same
100 -- geometric transformation to other shapes: just specify
101 -- them by calling the function Perform again.
105 Modified (me: in out; S : Shape from TopoDS)
106 ---Purpose: Returns the list of shapes modified from the shape
108 ---C++: return const &
110 returns ListOfShape from TopTools
111 is redefined virtual;
113 ModifiedShape(me; S: Shape from TopoDS)
114 returns Shape from TopoDS
115 ---Purpose: Returns the modified shape corresponding to <S>.
116 raises NoSuchObject from Standard
117 -- if S is not the initial shape or a sub-shape
118 -- of the initial shape.
119 is redefined virtual;
123 myGTrsf : GTrsf from gp;
124 myHist : Collect from BRepBuilderAPI;