|
||||
File indexing completed on 2025-01-18 10:03:31
0001 // Created on: 1992-09-28 0002 // Created by: Remi GILET 0003 // Copyright (c) 1992-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 _GC_MakeConicalSurface_HeaderFile 0018 #define _GC_MakeConicalSurface_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 #include <GC_Root.hxx> 0025 #include <Geom_ConicalSurface.hxx> 0026 0027 class gp_Ax2; 0028 class gp_Cone; 0029 class gp_Pnt; 0030 0031 0032 //! This class implements the following algorithms used 0033 //! to create a ConicalSurface from Geom. 0034 //! * Create a ConicalSurface parallel to another and passing 0035 //! through a point. 0036 //! * Create a ConicalSurface parallel to another at a distance 0037 //! <Dist>. 0038 //! * Create a ConicalSurface by 4 points. 0039 //! * Create a ConicalSurface by its axis and 2 points. 0040 //! * Create a ConicalSurface by 2 points and 2 radius. 0041 //! The local coordinate system of the ConicalSurface is defined 0042 //! with an axis placement (see class ElementarySurface). 0043 //! 0044 //! The "ZAxis" is the symmetry axis of the ConicalSurface, 0045 //! it gives the direction of increasing parametric value V. 0046 //! The apex of the surface is on the negative side of this axis. 0047 //! 0048 //! The parametrization range is : 0049 //! U [0, 2*PI], V ]-infinite, + infinite[ 0050 //! 0051 //! The "XAxis" and the "YAxis" define the placement plane of the 0052 //! surface (Z = 0, and parametric value V = 0) perpendicular to 0053 //! the symmetry axis. The "XAxis" defines the origin of the 0054 //! parameter U = 0. The trigonometric sense gives the positive 0055 //! orientation for the parameter U. 0056 //! 0057 //! When you create a ConicalSurface the U and V directions of 0058 //! parametrization are such that at each point of the surface the 0059 //! normal is oriented towards the "outside region". 0060 class GC_MakeConicalSurface : public GC_Root 0061 { 0062 public: 0063 0064 DEFINE_STANDARD_ALLOC 0065 0066 0067 0068 //! A2 defines the local coordinate system of the conical surface. 0069 //! Ang is the conical surface semi-angle ]0, PI/2[. 0070 //! Radius is the radius of the circle Viso in the placement plane 0071 //! of the conical surface defined with "XAxis" and "YAxis". 0072 //! The "ZDirection" of A2 defines the direction of the surface's 0073 //! axis of symmetry. 0074 //! If the location point of A2 is the apex of the surface 0075 //! Radius = 0 . 0076 //! At the creation the parametrization of the surface is defined 0077 //! such that the normal Vector (N = D1U ^ D1V) is oriented towards 0078 //! the "outside region" of the surface. 0079 //! Status is "NegativeRadius" if Radius < 0.0 or "BadAngle" if 0080 //! Ang < Resolution from gp or Ang >= PI/ - Resolution 0081 Standard_EXPORT GC_MakeConicalSurface(const gp_Ax2& A2, const Standard_Real Ang, const Standard_Real Radius); 0082 0083 //! Creates a ConicalSurface from a non persistent Cone from package gp. 0084 Standard_EXPORT GC_MakeConicalSurface(const gp_Cone& C); 0085 0086 //! Make a ConicalSurface from Geom <TheCone> passing through 3 0087 //! Pnt <P1>,<P2>,<P3>. 0088 //! Its axis is <P1P2> and the radius of its base is 0089 //! the distance between <P3> and <P1P2>. 0090 //! The distance between <P4> and <P1P2> is the radius of 0091 //! the section passing through <P4>. 0092 //! An error iss raised if <P1>,<P2>,<P3>,<P4> are 0093 //! colinear or if <P3P4> is perpendicular to <P1P2> or 0094 //! <P3P4> is colinear to <P1P2>. 0095 Standard_EXPORT GC_MakeConicalSurface(const gp_Pnt& P1, const gp_Pnt& P2, const gp_Pnt& P3, const gp_Pnt& P4); 0096 0097 //! Make a ConicalSurface with two points and two radius. 0098 //! The axis of the solution is the line passing through 0099 //! <P1> and <P2>. 0100 //! <R1> is the radius of the section passing through <P1> 0101 //! and <R2> the radius of the section passing through <P2>. 0102 Standard_EXPORT GC_MakeConicalSurface(const gp_Pnt& P1, const gp_Pnt& P2, const Standard_Real R1, const Standard_Real R2); 0103 0104 //! Returns the constructed cone. 0105 //! Exceptions 0106 //! StdFail_NotDone if no cone is constructed. 0107 Standard_EXPORT const Handle(Geom_ConicalSurface)& Value() const; 0108 0109 operator const Handle(Geom_ConicalSurface)& () const { return Value(); } 0110 0111 private: 0112 Handle(Geom_ConicalSurface) TheCone; 0113 }; 0114 0115 #endif // _GC_MakeConicalSurface_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |