|
|
|||
File indexing completed on 2026-12-03 10:54:51
0001 // Created on: 1993-03-10 0002 // Created by: JCV 0003 // Copyright (c) 1993-1999 Matra Datavision 0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS 0005 // 0006 // This file is part of Open CASCADE Technology software library. 0007 // 0008 // This library is free software; you can redistribute it and/or modify it under 0009 // the terms of the GNU Lesser General Public License version 2.1 as published 0010 // by the Free Software Foundation, with special exception defined in the file 0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0012 // distribution for complete text of the license and disclaimer of any warranty. 0013 // 0014 // Alternatively, this file may be used under the terms of Open CASCADE 0015 // commercial license or contractual agreement. 0016 0017 #ifndef _Geom_ElementarySurface_HeaderFile 0018 #define _Geom_ElementarySurface_HeaderFile 0019 0020 #include <gp_Ax3.hxx> 0021 #include <Geom_Surface.hxx> 0022 0023 //! Describes the common behavior of surfaces which 0024 //! have a simple parametric equation in a local 0025 //! coordinate system. The Geom package provides 0026 //! several implementations of concrete elementary surfaces: 0027 //! - the plane, and 0028 //! - four simple surfaces of revolution: the cylinder, the 0029 //! cone, the sphere and the torus. 0030 //! An elementary surface inherits the common behavior 0031 //! of Geom_Surface surfaces. Furthermore, it is located 0032 //! in 3D space by a coordinate system (a gp_Ax3 0033 //! object) which is also its local coordinate system. 0034 //! Any elementary surface is oriented, i.e. the normal 0035 //! vector is always defined, and gives the same 0036 //! orientation to the surface, at any point on the surface. 0037 //! In topology this property is referred to as the "outside 0038 //! region of the surface". This orientation is related to 0039 //! the two parametric directions of the surface. 0040 //! Rotation of a surface around the "main Axis" of its 0041 //! coordinate system, in the trigonometric sense given 0042 //! by the "X Direction" and the "Y Direction" of the 0043 //! coordinate system, defines the u parametric direction 0044 //! of that elementary surface of revolution. This is the 0045 //! default construction mode. 0046 //! It is also possible, however, to change the orientation 0047 //! of a surface by reversing one of the two parametric 0048 //! directions: use the UReverse or VReverse functions 0049 //! to change the orientation of the normal at any point on the surface. 0050 //! Warning 0051 //! The local coordinate system of an elementary surface 0052 //! is not necessarily direct: 0053 //! - if it is direct, the trigonometric sense defined by its 0054 //! "main Direction" is the same as the trigonometric 0055 //! sense defined by its two vectors "X Direction" and "Y Direction": 0056 //! "main Direction" = "X Direction" ^ "Y Direction" 0057 //! - if it is indirect, the two definitions of trigonometric 0058 //! sense are opposite: 0059 //! "main Direction" = - "X Direction" ^ "Y Direction" 0060 class Geom_ElementarySurface : public Geom_Surface 0061 { 0062 public: 0063 //! Changes the main axis (ZAxis) of the elementary surface. 0064 //! 0065 //! Raised if the direction of A1 is parallel to the XAxis of the 0066 //! coordinate system of the surface. 0067 void SetAxis(const gp_Ax1& theA1) { pos.SetAxis(theA1); } 0068 0069 //! Changes the location of the local coordinates system of the 0070 //! surface. 0071 void SetLocation(const gp_Pnt& theLoc) { pos.SetLocation(theLoc); } 0072 0073 //! Changes the local coordinates system of the surface. 0074 void SetPosition(const gp_Ax3& theAx3) { pos = theAx3; } 0075 0076 //! Returns the main axis of the surface (ZAxis). 0077 const gp_Ax1& Axis() const { return pos.Axis(); } 0078 0079 //! Returns the location point of the local coordinate system of the 0080 //! surface. 0081 const gp_Pnt& Location() const { return pos.Location(); } 0082 0083 //! Returns the local coordinates system of the surface. 0084 const gp_Ax3& Position() const { return pos; } 0085 0086 //! Reverses the U parametric direction of the surface. 0087 Standard_EXPORT void UReverse() override; 0088 0089 //! Return the parameter on the Ureversed surface for 0090 //! the point of parameter U on <me>. 0091 //! 0092 //! me->UReversed()->Value(me->UReversedParameter(U),V) 0093 //! is the same point as 0094 //! me->Value(U,V) 0095 Standard_EXPORT double UReversedParameter(const double U) const override = 0; 0096 0097 //! Reverses the V parametric direction of the surface. 0098 Standard_EXPORT void VReverse() override; 0099 0100 //! Return the parameter on the Vreversed surface for 0101 //! the point of parameter V on <me>. 0102 //! 0103 //! me->VReversed()->Value(U,me->VReversedParameter(V)) 0104 //! is the same point as 0105 //! me->Value(U,V) 0106 Standard_EXPORT double VReversedParameter(const double V) const override = 0; 0107 0108 //! Returns GeomAbs_CN, the global continuity of any elementary surface. 0109 Standard_EXPORT GeomAbs_Shape Continuity() const override; 0110 0111 //! Returns True. 0112 Standard_EXPORT bool IsCNu(const int N) const override; 0113 0114 //! Returns True. 0115 Standard_EXPORT bool IsCNv(const int N) const override; 0116 0117 //! Dumps the content of me into the stream 0118 Standard_EXPORT void DumpJson(Standard_OStream& theOStream, int theDepth = -1) const override; 0119 0120 DEFINE_STANDARD_RTTIEXT(Geom_ElementarySurface, Geom_Surface) 0121 0122 protected: 0123 gp_Ax3 pos; 0124 }; 0125 0126 #endif // _Geom_ElementarySurface_HeaderFile
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|