Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-24 09:16:15

0001 // Created on: 1993-01-09
0002 // Created by: CKY / Contract Toubro-Larsen ( TCD )
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_Flash_HeaderFile
0018 #define _IGESGeom_Flash_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <gp_XY.hxx>
0024 #include <IGESData_IGESEntity.hxx>
0025 #include <Standard_Integer.hxx>
0026 class gp_Pnt2d;
0027 class gp_Pnt;
0028 
0029 //! defines IGESFlash, Type <125> Form <0 - 4>
0030 //! in package IGESGeom
0031 //! A flash entity is a point in the ZT=0 plane that locates
0032 //! a particular closed area. That closed area can be defined
0033 //! in one of two ways. First, it can be an arbitrary closed
0034 //! area defined by any entity capable of defining a closed
0035 //! area. The points of this entity must all lie in the ZT=0
0036 //! plane. Second, it can be a member of a predefined set of
0037 //! flash shapes.
0038 class IGESGeom_Flash : public IGESData_IGESEntity
0039 {
0040 
0041 public:
0042   Standard_EXPORT IGESGeom_Flash();
0043 
0044   //! This method is used to set the fields of the class Flash
0045   //! - aPoint     : Reference of flash
0046   //! - aDim       : First flash sizing parameter
0047   //! - anotherDim : Second flash sizing parameter
0048   //! - aRotation  : Rotation of flash about reference point
0049   //! in radians
0050   //! - aReference : Pointer to the referenced entity or Null
0051   Standard_EXPORT void Init(const gp_XY&                            aPoint,
0052                             const double                            aDim,
0053                             const double                            anotherDim,
0054                             const double                            aRotation,
0055                             const occ::handle<IGESData_IGESEntity>& aReference);
0056 
0057   //! Changes FormNumber (indicates the Nature of the Flash :
0058   //! 0 Unspecified, then given by Reference, 1->4 various
0059   //! Specialisations (Circle,Rectangle, etc...) )
0060   //! Error if not in range [0-4]
0061   Standard_EXPORT void SetFormNumber(const int form);
0062 
0063   //! returns the referenced point, Z = 0 always
0064   Standard_EXPORT gp_Pnt2d ReferencePoint() const;
0065 
0066   //! returns the referenced point after applying Transf. Matrix
0067   Standard_EXPORT gp_Pnt TransformedReferencePoint() const;
0068 
0069   //! returns first flash sizing parameter
0070   Standard_EXPORT double Dimension1() const;
0071 
0072   //! returns second flash sizing parameter
0073   Standard_EXPORT double Dimension2() const;
0074 
0075   //! returns the angle in radians of the rotation of flash about the
0076   //! reference point
0077   Standard_EXPORT double Rotation() const;
0078 
0079   //! returns the referenced entity or Null handle.
0080   Standard_EXPORT occ::handle<IGESData_IGESEntity> ReferenceEntity() const;
0081 
0082   //! returns True if referenced entity is present.
0083   Standard_EXPORT bool HasReferenceEntity() const;
0084 
0085   DEFINE_STANDARD_RTTIEXT(IGESGeom_Flash, IGESData_IGESEntity)
0086 
0087 private:
0088   gp_XY                            thePoint;
0089   double                           theDim1;
0090   double                           theDim2;
0091   double                           theRotation;
0092   occ::handle<IGESData_IGESEntity> theReference;
0093 };
0094 
0095 #endif // _IGESGeom_Flash_HeaderFile