|
||||
File indexing completed on 2025-01-18 10:03:32
0001 // Created on: 1992-08-26 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 _gce_MakeCone_HeaderFile 0018 #define _gce_MakeCone_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 #include <gp_Cone.hxx> 0025 #include <gce_Root.hxx> 0026 class gp_Ax2; 0027 class gp_Pnt; 0028 class gp_Ax1; 0029 class gp_Lin; 0030 0031 0032 //! This class implements the following algorithms used 0033 //! to create a Cone from gp. 0034 //! * Create a Cone coaxial to another and passing 0035 //! through a point. 0036 //! * Create a Cone coaxial to another at a distance 0037 //! <Dist>. 0038 //! * Create a Cone by 4 points. 0039 //! * Create a Cone by its axis and 2 points. 0040 //! * Create a Cone by 2 points and 2 radius. 0041 //! * Create a Cone by an Ax2 an angle and the radius of 0042 //! its reference section. 0043 class gce_MakeCone : public gce_Root 0044 { 0045 public: 0046 0047 DEFINE_STANDARD_ALLOC 0048 0049 0050 0051 //! Creates an infinite conical surface. A2 locates the cone 0052 //! in the space and defines the reference plane of the surface. 0053 //! Ang is the conical surface semi-angle between 0 and PI/2 radians. 0054 //! Radius is the radius of the circle in the reference plane of 0055 //! the cone. 0056 //! If Radius is lower than 0.0 the status is " 0057 //! If Ang < Resolution from gp or Ang >= (PI/2) - Resolution. 0058 Standard_EXPORT gce_MakeCone(const gp_Ax2& A2, const Standard_Real Ang, const Standard_Real Radius); 0059 0060 //! Makes a Cone from gp <TheCone> coaxial to another 0061 //! Cone <Cone> and passing through a Pnt <Point>. 0062 Standard_EXPORT gce_MakeCone(const gp_Cone& Cone, const gp_Pnt& Point); 0063 0064 //! Makes a Cone from gp <TheCone> coaxial to another 0065 //! Cone <Cone> at the distance <Dist> which can 0066 //! be greater or lower than zero. 0067 Standard_EXPORT gce_MakeCone(const gp_Cone& Cone, const Standard_Real Dist); 0068 0069 //! Makes a Cone from gp <TheCone> by four points <P1>, 0070 //! <P2>,<P3> and <P4>. 0071 //! Its axis is <P1P2> and the radius of its base is 0072 //! the distance between <P3> and <P1P2>. 0073 //! The distance between <P4> and <P1P2> is the radius of 0074 //! the section passing through <P4>. 0075 //! If <P1> and <P2> are confused or <P3> and <P4> are 0076 //! confused we have the status "ConfusedPoints" 0077 //! if <P1>,<P2>,<P3>,<P4> are colinear we have the 0078 //! status "ColinearPoints" 0079 //! If <P3P4> is perpendicular to <P1P2> we have the 0080 //! status "NullAngle". 0081 //! <P3P4> is colinear to <P1P2> we have the status 0082 //! "NullAngle". 0083 Standard_EXPORT gce_MakeCone(const gp_Pnt& P1, const gp_Pnt& P2, const gp_Pnt& P3, const gp_Pnt& P4); 0084 0085 //! Makes a Cone by its axis <Axis> and two points. 0086 //! The distance between <P1> and the axis is the radius 0087 //! of the section passing through <P1>. 0088 //! The distance between <P2> and the axis is the radius 0089 //! of the section passing through <P2>. 0090 //! If <P1P2> is colinear to <Axis> we have the status 0091 //! "NullAngle" 0092 //! If <P3P4> is perpendicular to <Axis> we have the status 0093 //! "NullAngle" 0094 //! If <P1> and <P2> are confused we have the status 0095 //! "ConfusedPoints" 0096 Standard_EXPORT gce_MakeCone(const gp_Ax1& Axis, const gp_Pnt& P1, const gp_Pnt& P2); 0097 0098 //! Makes a Cone by its axis <Axis> and two points. 0099 //! The distance between <P1> and the axis is the radius 0100 //! of the section passing through <P1> 0101 //! The distance between <P2> and the axis is the radius 0102 //! of the section passing through <P2> 0103 //! If <P1P2> is colinear to <Axis> we have the status 0104 //! "NullAngle" 0105 //! If <P3P4> is perpendicular to <Axis> we have the status 0106 //! "NullAngle" 0107 //! If <P1> and <P2> are confused we have the status 0108 //! "ConfusedPoints" 0109 Standard_EXPORT gce_MakeCone(const gp_Lin& Axis, const gp_Pnt& P1, const gp_Pnt& P2); 0110 0111 //! Makes a Cone with two points and two radius. 0112 //! The axis of the solution is the line passing through 0113 //! <P1> and <P2>. 0114 //! <R1> is the radius of the section passing through <P1> 0115 //! and <R2> the radius of the section passing through <P2>. 0116 //! If <P1> and <P2> are confused we have the status "NullAxis". 0117 //! Warning 0118 //! If an error occurs (that is, when IsDone returns 0119 //! false), the Status function returns: 0120 //! - gce_NegativeRadius if Radius, R1 or R2 is less than 0.0; 0121 //! - gce_BadAngle if Ang is less than 0122 //! gp::Resolution() or greater than Pi/2.- gp::Resolution(); 0123 //! - gce_ConfusedPoints if P1 and P2 or P3 and P4 are coincident; 0124 //! - gce_NullAxis if the points P1 and P2, are coincident (5th syntax only); 0125 //! - gce_NullAngle if: 0126 //! - the vector joining P1 to P2 is parallel to either 0127 //! Axis or the line joining P3 to P4, or 0128 //! - R1 and R2 are equal, (that is, their difference is 0129 //! less than gp::Resolution()); or 0130 //! - gce_NullRadius if: 0131 //! - the vector joining P1 to P2 is perpendicular to the line joining P3 to P4, 0132 //! - the vector joining P1 to P2 is perpendicular to Axis, or 0133 //! - P1, P2, P3, and P4 are collinear. 0134 Standard_EXPORT gce_MakeCone(const gp_Pnt& P1, const gp_Pnt& P2, const Standard_Real R1, const Standard_Real R2); 0135 0136 //! Returns the constructed cone. 0137 //! Exceptions StdFail_NotDone if no cone is constructed. 0138 Standard_EXPORT const gp_Cone& Value() const; 0139 0140 Standard_EXPORT const gp_Cone& Operator() const; 0141 Standard_EXPORT operator gp_Cone() const; 0142 0143 0144 0145 0146 protected: 0147 0148 0149 0150 0151 0152 private: 0153 0154 0155 0156 gp_Cone TheCone; 0157 0158 0159 }; 0160 0161 0162 0163 0164 0165 0166 0167 #endif // _gce_MakeCone_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |