0024023: Revamp the OCCT Handle -- ambiguity
[occt.git] / src / BRepBuilderAPI / BRepBuilderAPI_GTransform.cdl
CommitLineData
b311480e 1-- Created on: 1996-12-30
2-- Created by: Stagiaire Mary FABIEN
3-- Copyright (c) 1996-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
17class GTransform from BRepBuilderAPI inherits ModifyShape from BRepBuilderAPI
18
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
25 -- - an affinity, 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.
41
42
43
44uses
45 Trsf from gp,
46 GTrsf from gp,
47 Shape from TopoDS,
48 Face from TopoDS,
49 Collect from BRepBuilderAPI,
50 ShapeModification from BRepBuilderAPI,
51 ListOfShape from TopTools
52
53-- Modified by Sergey KHROMOV - Thu Mar 27 17:45:42 2003 Begin
54raises
55 NoSuchObject from Standard
56
57-- Modified by Sergey KHROMOV - Thu Mar 27 17:45:42 2003 End
58is
59
60 Create(T: GTrsf from gp)
61
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.
66
67
68 Create(S: Shape from TopoDS; T: GTrsf from gp;
69 Copy: Boolean from Standard = Standard_False)
70
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
80 -- a duplicate of S.
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.
85
86
87 Perform(me: in out; S : Shape from TopoDS;
88 Copy: Boolean from Standard = Standard_False)
89
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.
102
103 is static;
104
105 Modified (me: in out; S : Shape from TopoDS)
106 ---Purpose: Returns the list of shapes modified from the shape
107 -- <S>.
108 ---C++: return const &
109 ---Level: Public
110 returns ListOfShape from TopTools
111 is redefined virtual;
112
7fd59977 113 ModifiedShape(me; S: Shape from TopoDS)
114 returns Shape from TopoDS
115 ---Purpose: Returns the modified shape corresponding to <S>.
7fd59977 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;
7fd59977 120
121fields
122
123 myGTrsf : GTrsf from gp;
7fd59977 124 myHist : Collect from BRepBuilderAPI;
125
126end Transform;