1 -- File: Geom2d_Geometry.cdl
2 -- Created: Wed Mar 24 18:05:00 1993
5 -- Copyright: Matra Datavision 1993
7 ---Copyright: Matra Datavision 1991
10 deferred class Geometry from Geom2d inherits TShared from MMgt
13 -- The general abstract class Geometry in 2D space describes
14 -- the common behaviour of all the geometric entities.
16 -- All the objects derived from this class can be move with a
17 -- geometric transformation. Only the transformations which
18 -- doesn't modify the nature of the geometry are available in
20 -- The method Transform which defines a general transformation
21 -- is deferred. The other specifics transformations used the
23 -- All the following transformations modify the object itself.
25 -- Only transformations which do not modify the nature
26 -- of the geometry can be applied to Geom2d objects:
27 -- this is the case with translations, rotations,
28 -- symmetries and scales; this is also the case with
29 -- gp_Trsf2d composite transformations which are
30 -- used to define the geometric transformations applied
31 -- using the Transform or Transformed functions.
32 -- Note: Geometry defines the "prototype" of the
33 -- abstract method Transform which is defined for each
34 -- concrete type of derived object. All other
35 -- transformations are implemented using the Transform method.
42 raises ConstructionError from Standard
48 Mirror (me : mutable; P : Pnt2d)
49 --- Purpose : Performs the symmetrical transformation of a Geometry
50 -- with respect to the point P which is the center of the
51 -- symmetry and assigns the result to this geometric object.
55 Mirror (me : mutable; A : Ax2d)
56 --- Purpose : Performs the symmetrical transformation of a Geometry
57 -- with respect to an axis placement which is the axis of the symmetry.
62 Rotate (me : mutable; P : Pnt2d; Ang : Real)
63 --- Purpose : Rotates a Geometry. P is the center of the rotation.
64 -- Ang is the angular value of the rotation in radians.
68 Scale (me : mutable; P : Pnt2d; S : Real)
69 --- Purpose : Scales a Geometry. S is the scaling value.
73 Translate (me : mutable; V : Vec2d)
74 --- Purpose : Translates a Geometry. V is the vector of the tanslation.
77 Translate (me : mutable; P1, P2 : Pnt2d)
78 --- Purpose : Translates a Geometry from the point P1 to the point P2.
81 Transform (me : mutable; T : Trsf2d)
82 --- Purpose : Transformation of a geometric object. This tansformation
83 -- can be a translation, a rotation, a symmetry, a scaling
84 -- or a complex transformation obtained by combination of
85 -- the previous elementaries transformations.
86 -- (see class Transformation of the package Geom2d).
92 --- Purpose : The following transformations have the same properties
93 -- as the previous ones but they don't modified the object
94 -- itself. A copy of the object is returned.
98 Mirrored (me; P : Pnt2d) returns mutable like me
101 Mirrored (me; A : Ax2d) returns mutable like me
104 Rotated (me; P : Pnt2d; Ang : Real) returns mutable like me
107 Scaled (me; P : Pnt2d; S : Real) returns mutable like me
110 Transformed (me; T : Trsf2d) returns mutable like me
113 Translated (me; V : Vec2d) returns mutable like me
116 Translated (me; P1, P2 : Pnt2d) returns mutable like me
119 Copy (me) returns mutable like me is deferred;