Back to home page

EIC code displayed by LXR

 
 

    


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

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 _IGESDraw_Drawing_HeaderFile
0018 #define _IGESDraw_Drawing_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <IGESDraw_HArray1OfViewKindEntity.hxx>
0024 #include <TColgp_HArray1OfXY.hxx>
0025 #include <IGESData_HArray1OfIGESEntity.hxx>
0026 #include <IGESData_IGESEntity.hxx>
0027 #include <Standard_Integer.hxx>
0028 class IGESData_ViewKindEntity;
0029 class gp_Pnt2d;
0030 class gp_XY;
0031 class gp_XYZ;
0032 
0033 
0034 class IGESDraw_Drawing;
0035 DEFINE_STANDARD_HANDLE(IGESDraw_Drawing, IGESData_IGESEntity)
0036 
0037 //! defines IGESDrawing, Type <404> Form <0>
0038 //! in package IGESDraw
0039 //!
0040 //! Specifies a drawing as a collection of annotation entities
0041 //! defined in drawing space, and views which together
0042 //! constitute a single representation of a part
0043 class IGESDraw_Drawing : public IGESData_IGESEntity
0044 {
0045 
0046 public:
0047 
0048   
0049   Standard_EXPORT IGESDraw_Drawing();
0050   
0051   //! This method is used to set the fields of the class
0052   //! Drawing
0053   //! - allViews       : Pointers to DEs of View entities
0054   //! - allViewOrigins : Origin coordinates of transformed Views
0055   //! - allAnnotations : Pointers to DEs of Annotation entities
0056   //! raises exception if Lengths of allViews and allViewOrigins are
0057   //! not same.
0058   Standard_EXPORT void Init (const Handle(IGESDraw_HArray1OfViewKindEntity)& allViews, const Handle(TColgp_HArray1OfXY)& allViewOrigins, const Handle(IGESData_HArray1OfIGESEntity)& allAnnotations);
0059   
0060   //! returns the number of view pointers in <me>
0061   Standard_EXPORT Standard_Integer NbViews() const;
0062   
0063   //! returns the ViewKindEntity indicated by ViewIndex
0064   //! raises an exception if ViewIndex <= 0 or ViewIndex > NbViews().
0065   Standard_EXPORT Handle(IGESData_ViewKindEntity) ViewItem (const Standard_Integer ViewIndex) const;
0066   
0067   //! returns the Drawing space coordinates of the origin of the
0068   //! Transformed view indicated by TViewIndex
0069   //! raises an exception if TViewIndex <= 0 or TViewIndex > NbViews().
0070   Standard_EXPORT gp_Pnt2d ViewOrigin (const Standard_Integer TViewIndex) const;
0071   
0072   //! returns the number of Annotation entities in <me>
0073   Standard_EXPORT Standard_Integer NbAnnotations() const;
0074   
0075   //! returns the Annotation entity in this Drawing, indicated by the
0076   //! AnnotationIndex
0077   //! raises an exception if AnnotationIndex <= 0 or
0078   //! AnnotationIndex > NbAnnotations().
0079   Standard_EXPORT Handle(IGESData_IGESEntity) Annotation (const Standard_Integer AnnotationIndex) const;
0080   
0081   Standard_EXPORT gp_XY ViewToDrawing (const Standard_Integer NumView, const gp_XYZ& ViewCoords) const;
0082   
0083   //! Returns the Drawing Unit Value if it is specified (by a
0084   //! specific property entity)
0085   //! If not specified, returns False, and val as zero :
0086   //! unit to consider is then the model unit in GlobalSection
0087   Standard_EXPORT Standard_Boolean DrawingUnit (Standard_Real& value) const;
0088   
0089   //! Returns the Drawing Size if it is specified (by a
0090   //! specific property entity)
0091   //! If not specified, returns False, and X,Y as zero :
0092   //! unit to consider is then the model unit in GlobalSection
0093   Standard_EXPORT Standard_Boolean DrawingSize (Standard_Real& X, Standard_Real& Y) const;
0094 
0095 
0096 
0097 
0098   DEFINE_STANDARD_RTTIEXT(IGESDraw_Drawing,IGESData_IGESEntity)
0099 
0100 protected:
0101 
0102 
0103 
0104 
0105 private:
0106 
0107 
0108   Handle(IGESDraw_HArray1OfViewKindEntity) theViews;
0109   Handle(TColgp_HArray1OfXY) theViewOrigins;
0110   Handle(IGESData_HArray1OfIGESEntity) theAnnotations;
0111 
0112 
0113 };
0114 
0115 
0116 
0117 
0118 
0119 
0120 
0121 #endif // _IGESDraw_Drawing_HeaderFile