|
||||
File indexing completed on 2025-01-18 10:03:36
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 class Geom_ElementarySurface; 0024 DEFINE_STANDARD_HANDLE(Geom_ElementarySurface, Geom_Surface) 0025 0026 //! Describes the common behavior of surfaces which 0027 //! have a simple parametric equation in a local 0028 //! coordinate system. The Geom package provides 0029 //! several implementations of concrete elementary surfaces: 0030 //! - the plane, and 0031 //! - four simple surfaces of revolution: the cylinder, the 0032 //! cone, the sphere and the torus. 0033 //! An elementary surface inherits the common behavior 0034 //! of Geom_Surface surfaces. Furthermore, it is located 0035 //! in 3D space by a coordinate system (a gp_Ax3 0036 //! object) which is also its local coordinate system. 0037 //! Any elementary surface is oriented, i.e. the normal 0038 //! vector is always defined, and gives the same 0039 //! orientation to the surface, at any point on the surface. 0040 //! In topology this property is referred to as the "outside 0041 //! region of the surface". This orientation is related to 0042 //! the two parametric directions of the surface. 0043 //! Rotation of a surface around the "main Axis" of its 0044 //! coordinate system, in the trigonometric sense given 0045 //! by the "X Direction" and the "Y Direction" of the 0046 //! coordinate system, defines the u parametric direction 0047 //! of that elementary surface of revolution. This is the 0048 //! default construction mode. 0049 //! It is also possible, however, to change the orientation 0050 //! of a surface by reversing one of the two parametric 0051 //! directions: use the UReverse or VReverse functions 0052 //! to change the orientation of the normal at any point on the surface. 0053 //! Warning 0054 //! The local coordinate system of an elementary surface 0055 //! is not necessarily direct: 0056 //! - if it is direct, the trigonometric sense defined by its 0057 //! "main Direction" is the same as the trigonometric 0058 //! sense defined by its two vectors "X Direction" and "Y Direction": 0059 //! "main Direction" = "X Direction" ^ "Y Direction" 0060 //! - if it is indirect, the two definitions of trigonometric 0061 //! sense are opposite: 0062 //! "main Direction" = - "X Direction" ^ "Y Direction" 0063 class Geom_ElementarySurface : public Geom_Surface 0064 { 0065 public: 0066 0067 //! Changes the main axis (ZAxis) of the elementary surface. 0068 //! 0069 //! Raised if the direction of A1 is parallel to the XAxis of the 0070 //! coordinate system of the surface. 0071 void SetAxis (const gp_Ax1& theA1) { pos.SetAxis(theA1); } 0072 0073 //! Changes the location of the local coordinates system of the 0074 //! surface. 0075 void SetLocation (const gp_Pnt& theLoc) { pos.SetLocation(theLoc); } 0076 0077 //! Changes the local coordinates system of the surface. 0078 void SetPosition (const gp_Ax3& theAx3) { pos = theAx3; } 0079 0080 //! Returns the main axis of the surface (ZAxis). 0081 const gp_Ax1& Axis() const { return pos.Axis(); } 0082 0083 //! Returns the location point of the local coordinate system of the 0084 //! surface. 0085 const gp_Pnt& Location() const { return pos.Location(); } 0086 0087 //! Returns the local coordinates system of the surface. 0088 const gp_Ax3& Position() const { return pos; } 0089 0090 //! Reverses the U parametric direction of the surface. 0091 Standard_EXPORT virtual void UReverse() Standard_OVERRIDE; 0092 0093 //! Return the parameter on the Ureversed surface for 0094 //! the point of parameter U on <me>. 0095 //! 0096 //! me->UReversed()->Value(me->UReversedParameter(U),V) 0097 //! is the same point as 0098 //! me->Value(U,V) 0099 Standard_EXPORT virtual Standard_Real UReversedParameter (const Standard_Real U) const Standard_OVERRIDE = 0; 0100 0101 //! Reverses the V parametric direction of the surface. 0102 Standard_EXPORT virtual void VReverse() Standard_OVERRIDE; 0103 0104 //! Return the parameter on the Vreversed surface for 0105 //! the point of parameter V on <me>. 0106 //! 0107 //! me->VReversed()->Value(U,me->VReversedParameter(V)) 0108 //! is the same point as 0109 //! me->Value(U,V) 0110 Standard_EXPORT virtual Standard_Real VReversedParameter (const Standard_Real V) const Standard_OVERRIDE = 0; 0111 0112 //! Returns GeomAbs_CN, the global continuity of any elementary surface. 0113 Standard_EXPORT GeomAbs_Shape Continuity() const Standard_OVERRIDE; 0114 0115 //! Returns True. 0116 Standard_EXPORT Standard_Boolean IsCNu (const Standard_Integer N) const Standard_OVERRIDE; 0117 0118 //! Returns True. 0119 Standard_EXPORT Standard_Boolean IsCNv (const Standard_Integer N) const Standard_OVERRIDE; 0120 0121 //! Dumps the content of me into the stream 0122 Standard_EXPORT virtual void DumpJson (Standard_OStream& theOStream, Standard_Integer theDepth = -1) const Standard_OVERRIDE; 0123 0124 DEFINE_STANDARD_RTTIEXT(Geom_ElementarySurface,Geom_Surface) 0125 0126 protected: 0127 gp_Ax3 pos; 0128 }; 0129 0130 #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 |