0030448: Coding - add typo detection to derivation creation methods using Standard_NO...
[occt.git] / src / Geom2d / Geom2d_Geometry.hxx
CommitLineData
42cf5bc1 1// Created on: 1993-03-24
2// Created by: JCV
3// Copyright (c) 1993-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
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.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _Geom2d_Geometry_HeaderFile
18#define _Geom2d_Geometry_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
25e59720 23#include <Standard_Transient.hxx>
42cf5bc1 24#include <Standard_Real.hxx>
25class Standard_ConstructionError;
26class gp_Pnt2d;
27class gp_Ax2d;
28class gp_Vec2d;
29class gp_Trsf2d;
30
31
32class Geom2d_Geometry;
25e59720 33DEFINE_STANDARD_HANDLE(Geom2d_Geometry, Standard_Transient)
42cf5bc1 34
35
36//! The general abstract class Geometry in 2D space describes
37//! the common behaviour of all the geometric entities.
38//!
39//! All the objects derived from this class can be move with a
40//! geometric transformation. Only the transformations which
41//! doesn't modify the nature of the geometry are available in
42//! this package.
43//! The method Transform which defines a general transformation
44//! is deferred. The other specifics transformations used the
45//! method Transform.
46//! All the following transformations modify the object itself.
47//! Warning
48//! Only transformations which do not modify the nature
49//! of the geometry can be applied to Geom2d objects:
50//! this is the case with translations, rotations,
51//! symmetries and scales; this is also the case with
52//! gp_Trsf2d composite transformations which are
53//! used to define the geometric transformations applied
54//! using the Transform or Transformed functions.
55//! Note: Geometry defines the "prototype" of the
56//! abstract method Transform which is defined for each
57//! concrete type of derived object. All other
58//! transformations are implemented using the Transform method.
25e59720 59class Geom2d_Geometry : public Standard_Transient
42cf5bc1 60{
61
62public:
63
64
65 //! Performs the symmetrical transformation of a Geometry
66 //! with respect to the point P which is the center of the
67 //! symmetry and assigns the result to this geometric object.
68 Standard_EXPORT void Mirror (const gp_Pnt2d& P);
69
70 //! Performs the symmetrical transformation of a Geometry
71 //! with respect to an axis placement which is the axis of the symmetry.
72 Standard_EXPORT void Mirror (const gp_Ax2d& A);
73
74 //! Rotates a Geometry. P is the center of the rotation.
75 //! Ang is the angular value of the rotation in radians.
76 Standard_EXPORT void Rotate (const gp_Pnt2d& P, const Standard_Real Ang);
77
78 //! Scales a Geometry. S is the scaling value.
79 Standard_EXPORT void Scale (const gp_Pnt2d& P, const Standard_Real S);
80
81 //! Translates a Geometry. V is the vector of the tanslation.
82 Standard_EXPORT void Translate (const gp_Vec2d& V);
83
84 //! Translates a Geometry from the point P1 to the point P2.
85 Standard_EXPORT void Translate (const gp_Pnt2d& P1, const gp_Pnt2d& P2);
86
87 //! Transformation of a geometric object. This tansformation
88 //! can be a translation, a rotation, a symmetry, a scaling
89 //! or a complex transformation obtained by combination of
90 //! the previous elementaries transformations.
91 //! (see class Transformation of the package Geom2d).
92 //! 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.
95 Standard_EXPORT virtual void Transform (const gp_Trsf2d& T) = 0;
96
0be7dbe1 97 Standard_EXPORT Standard_NODISCARD Handle(Geom2d_Geometry) Mirrored (const gp_Pnt2d& P) const;
42cf5bc1 98
0be7dbe1 99 Standard_EXPORT Standard_NODISCARD Handle(Geom2d_Geometry) Mirrored (const gp_Ax2d& A) const;
42cf5bc1 100
0be7dbe1 101 Standard_EXPORT Standard_NODISCARD Handle(Geom2d_Geometry) Rotated (const gp_Pnt2d& P, const Standard_Real Ang) const;
42cf5bc1 102
0be7dbe1 103 Standard_EXPORT Standard_NODISCARD Handle(Geom2d_Geometry) Scaled (const gp_Pnt2d& P, const Standard_Real S) const;
42cf5bc1 104
0be7dbe1 105 Standard_EXPORT Standard_NODISCARD Handle(Geom2d_Geometry) Transformed (const gp_Trsf2d& T) const;
42cf5bc1 106
0be7dbe1 107 Standard_EXPORT Standard_NODISCARD Handle(Geom2d_Geometry) Translated (const gp_Vec2d& V) const;
42cf5bc1 108
0be7dbe1 109 Standard_EXPORT Standard_NODISCARD Handle(Geom2d_Geometry) Translated (const gp_Pnt2d& P1, const gp_Pnt2d& P2) const;
42cf5bc1 110
111 Standard_EXPORT virtual Handle(Geom2d_Geometry) Copy() const = 0;
112
113
114
115
25e59720 116 DEFINE_STANDARD_RTTIEXT(Geom2d_Geometry,Standard_Transient)
42cf5bc1 117
118protected:
119
120
121
122
123private:
124
125
126
127
128};
129
130
131
132
133
134
135
136#endif // _Geom2d_Geometry_HeaderFile