Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-14 09:14:53

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 //! defines IGESPlane, Type <108> Form <-1,0,1>
0029 //! in package IGESGeom
0030 //! A plane entity can be used to represent unbounded plane,
0031 //! as well as bounded portion of a plane. In either of the
0032 //! above cases the plane is defined within definition space
0033 //! by means of coefficients A, B, C, D where at least one of
0034 //! A, B, C is non-zero and A * XT + B * YT + C * ZT = D
0035 class IGESGeom_Plane : public IGESData_IGESEntity
0036 {
0037 
0038 public:
0039   Standard_EXPORT IGESGeom_Plane();
0040 
0041   Standard_EXPORT void Init(const double                            A,
0042                             const double                            B,
0043                             const double                            C,
0044                             const double                            D,
0045                             const occ::handle<IGESData_IGESEntity>& aCurve,
0046                             const gp_XYZ&                           attach,
0047                             const double                            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 int form);
0055 
0056   Standard_EXPORT void Equation(double& A, double& B, double& C, double& D) const;
0057 
0058   Standard_EXPORT void TransformedEquation(double& A, double& B, double& C, double& D) const;
0059 
0060   //! returns True if there exists a bounding curve
0061   Standard_EXPORT bool HasBoundingCurve() const;
0062 
0063   //! returns True if bounding curve exists and bounded portion is negative
0064   Standard_EXPORT bool HasBoundingCurveHole() const;
0065 
0066   //! returns Optional Bounding Curve, can be positive (normal clipping)
0067   //! or negative (hole) according to Form Number
0068   Standard_EXPORT occ::handle<IGESData_IGESEntity> BoundingCurve() const;
0069 
0070   //! returns True if SymbolSize() > 0, False if SymbolSize() = 0
0071   Standard_EXPORT bool 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 double SymbolSize() const;
0082 
0083   DEFINE_STANDARD_RTTIEXT(IGESGeom_Plane, IGESData_IGESEntity)
0084 
0085 private:
0086   double                           theA;
0087   double                           theB;
0088   double                           theC;
0089   double                           theD;
0090   occ::handle<IGESData_IGESEntity> theCurve;
0091   gp_XYZ                           theAttach;
0092   double                           theSize;
0093 };
0094 
0095 #endif // _IGESGeom_Plane_HeaderFile