|
||||
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_MakePln_HeaderFile 0018 #define _gce_MakePln_HeaderFile 0019 0020 #include <Standard.hxx> 0021 #include <Standard_DefineAlloc.hxx> 0022 #include <Standard_Handle.hxx> 0023 0024 #include <gp_Pln.hxx> 0025 #include <gce_Root.hxx> 0026 class gp_Ax2; 0027 class gp_Pnt; 0028 class gp_Dir; 0029 class gp_Ax1; 0030 0031 0032 //! This class implements the following algorithms used 0033 //! to create a Plane from gp. 0034 //! * Create a Pln parallel to another and passing 0035 //! through a point. 0036 //! * Create a Pln passing through 3 points. 0037 //! * Create a Pln by its normal. 0038 //! Defines a non-persistent plane. 0039 //! The plane is located in 3D space with an axis placement 0040 //! two axis. It is the local coordinate system of the plane. 0041 //! 0042 //! The "Location" point and the main direction of this axis 0043 //! placement define the "Axis" of the plane. It is the axis 0044 //! normal to the plane which gives the orientation of the 0045 //! plane. 0046 //! 0047 //! The "XDirection" and the "YDirection" of the axis 0048 //! placement define the plane ("XAxis" and "YAxis") . 0049 class gce_MakePln : public gce_Root 0050 { 0051 public: 0052 0053 DEFINE_STANDARD_ALLOC 0054 0055 0056 0057 //! The coordinate system of the plane is defined with the axis 0058 //! placement A2. 0059 //! The "Direction" of A2 defines the normal to the plane. 0060 //! The "Location" of A2 defines the location (origin) of the plane. 0061 //! The "XDirection" and "YDirection" of A2 define the "XAxis" and 0062 //! the "YAxis" of the plane used to parametrize the plane. 0063 Standard_EXPORT gce_MakePln(const gp_Ax2& A2); 0064 0065 0066 //! Creates a plane with the "Location" point <P> 0067 //! and the normal direction <V>. 0068 Standard_EXPORT gce_MakePln(const gp_Pnt& P, const gp_Dir& V); 0069 0070 0071 //! Creates a plane from its cartesian equation : 0072 //! A * X + B * Y + C * Z + D = 0.0 0073 //! 0074 //! the status is "BadEquation" if Sqrt (A*A + B*B + C*C) <= 0075 //! Resolution from gp. 0076 Standard_EXPORT gce_MakePln(const Standard_Real A, const Standard_Real B, const Standard_Real C, const Standard_Real D); 0077 0078 //! Make a Pln from gp <ThePln> parallel to another 0079 //! Pln <Pln> and passing through a Pnt <Point>. 0080 Standard_EXPORT gce_MakePln(const gp_Pln& Pln, const gp_Pnt& Point); 0081 0082 //! Make a Pln from gp <ThePln> parallel to another 0083 //! Pln <Pln> at the distance <Dist> which can be greater 0084 //! or less than zero. 0085 //! In the first case the result is at the distance 0086 //! <Dist> to the plane <Pln> in the direction of the 0087 //! normal to <Pln>. 0088 //! Otherwise it is in the opposite direction. 0089 Standard_EXPORT gce_MakePln(const gp_Pln& Pln, const Standard_Real Dist); 0090 0091 //! Make a Pln from gp <ThePln> passing through 3 0092 //! Pnt <P1>,<P2>,<P3>. 0093 //! It returns false if <P1> <P2> <P3> are confused. 0094 Standard_EXPORT gce_MakePln(const gp_Pnt& P1, const gp_Pnt& P2, const gp_Pnt& P3); 0095 0096 //! Make a Pln from gp <ThePln> perpendicular to the line 0097 //! passing through <P1>,<P2>. 0098 //! The status is "ConfusedPoints" if <P1> <P2> are confused. 0099 Standard_EXPORT gce_MakePln(const gp_Pnt& P1, const gp_Pnt& P2); 0100 0101 //! Make a pln passing through the location of <Axis>and 0102 //! normal to the Direction of <Axis>. 0103 //! Warning - If an error occurs (that is, when IsDone returns 0104 //! false), the Status function returns: 0105 //! - gce_BadEquation if Sqrt(A*A + B*B + 0106 //! C*C) is less than or equal to gp::Resolution(), 0107 //! - gce_ConfusedPoints if P1 and P2 are coincident, or 0108 //! - gce_ColinearPoints if P1, P2 and P3 are collinear. 0109 Standard_EXPORT gce_MakePln(const gp_Ax1& Axis); 0110 0111 //! Returns the constructed plane. 0112 //! Exceptions StdFail_NotDone if no plane is constructed. 0113 Standard_EXPORT const gp_Pln& Value() const; 0114 0115 Standard_EXPORT const gp_Pln& Operator() const; 0116 Standard_EXPORT operator gp_Pln() const; 0117 0118 0119 0120 0121 protected: 0122 0123 0124 0125 0126 0127 private: 0128 0129 0130 0131 gp_Pln ThePln; 0132 0133 0134 }; 0135 0136 0137 0138 0139 0140 0141 0142 #endif // _gce_MakePln_HeaderFile
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |