Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:04:01

0001 // Created on: 1993-01-09
0002 // Created by: CKY / Contract Toubro-Larsen ( Kiran )
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 _IGESGeom_Plane_HeaderFile
0018 #define _IGESGeom_Plane_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <gp_XYZ.hxx>
0024 #include <IGESData_IGESEntity.hxx>
0025 #include <Standard_Integer.hxx>
0026 class gp_Pnt;
0027 
0028 
0029 class IGESGeom_Plane;
0030 DEFINE_STANDARD_HANDLE(IGESGeom_Plane, IGESData_IGESEntity)
0031 
0032 //! defines IGESPlane, Type <108> Form <-1,0,1>
0033 //! in package IGESGeom
0034 //! A plane entity can be used to represent unbounded plane,
0035 //! as well as bounded portion of a plane. In either of the
0036 //! above cases the plane is defined within definition space
0037 //! by means of coefficients A, B, C, D where at least one of
0038 //! A, B, C is non-zero and  A * XT + B * YT + C * ZT = D
0039 class IGESGeom_Plane : public IGESData_IGESEntity
0040 {
0041 
0042 public:
0043 
0044   
0045   Standard_EXPORT IGESGeom_Plane();
0046   
0047   Standard_EXPORT void Init (const Standard_Real A, const Standard_Real B, const Standard_Real C, const Standard_Real D, const Handle(IGESData_IGESEntity)& aCurve, const gp_XYZ& attach, const Standard_Real aSize);
0048   
0049   //! Changes FormNumber (indicates the Type of Bound :
0050   //! 0 no Bound, 1 (External) Bound, -1 Hole)
0051   //! Remark that Init keeps this Value and must be consistent :
0052   //! aCurve Null if FormNumber = 0, Non-Null else
0053   //! Error if not in ranges [0-1] or [10-12]
0054   Standard_EXPORT void SetFormNumber (const Standard_Integer form);
0055   
0056   Standard_EXPORT void Equation (Standard_Real& A, Standard_Real& B, Standard_Real& C, Standard_Real& D) const;
0057   
0058   Standard_EXPORT void TransformedEquation (Standard_Real& A, Standard_Real& B, Standard_Real& C, Standard_Real& D) const;
0059   
0060   //! returns True if there exists a bounding curve
0061   Standard_EXPORT Standard_Boolean HasBoundingCurve() const;
0062   
0063   //! returns True if bounding curve exists and bounded portion is negative
0064   Standard_EXPORT Standard_Boolean HasBoundingCurveHole() const;
0065   
0066   //! returns Optional Bounding Curve, can be positive (normal clipping)
0067   //! or negative (hole) according to Form Number
0068   Standard_EXPORT Handle(IGESData_IGESEntity) BoundingCurve() const;
0069   
0070   //! returns True if SymbolSize() > 0, False if SymbolSize() = 0
0071   Standard_EXPORT Standard_Boolean HasSymbolAttach() const;
0072   
0073   //! returns (X, Y, Z) if symbol exists else returns (0, 0, 0)
0074   Standard_EXPORT gp_Pnt SymbolAttach() const;
0075   
0076   //! returns (X, Y, Z) if symbol exists after applying Transf. Matrix
0077   //! else returns (0, 0, 0)
0078   Standard_EXPORT gp_Pnt TransformedSymbolAttach() const;
0079   
0080   //! Size of optional display symbol
0081   Standard_EXPORT Standard_Real SymbolSize() const;
0082 
0083 
0084 
0085 
0086   DEFINE_STANDARD_RTTIEXT(IGESGeom_Plane,IGESData_IGESEntity)
0087 
0088 protected:
0089 
0090 
0091 
0092 
0093 private:
0094 
0095 
0096   Standard_Real theA;
0097   Standard_Real theB;
0098   Standard_Real theC;
0099   Standard_Real theD;
0100   Handle(IGESData_IGESEntity) theCurve;
0101   gp_XYZ theAttach;
0102   Standard_Real theSize;
0103 
0104 
0105 };
0106 
0107 
0108 
0109 
0110 
0111 
0112 
0113 #endif // _IGESGeom_Plane_HeaderFile