1 // Created on: 1993-01-09
2 // Created by: CKY / Contract Toubro-Larsen ( TCD )
3 // Copyright (c) 1993-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
6 // This file is part of Open CASCADE Technology software library.
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _IGESDraw_Drawing_HeaderFile
18 #define _IGESDraw_Drawing_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <IGESDraw_HArray1OfViewKindEntity.hxx>
24 #include <TColgp_HArray1OfXY.hxx>
25 #include <IGESData_HArray1OfIGESEntity.hxx>
26 #include <IGESData_IGESEntity.hxx>
27 #include <Standard_Integer.hxx>
28 #include <Standard_Boolean.hxx>
29 #include <Standard_Real.hxx>
30 class Standard_DimensionMismatch;
31 class Standard_OutOfRange;
32 class IGESData_ViewKindEntity;
34 class IGESData_IGESEntity;
39 class IGESDraw_Drawing;
40 DEFINE_STANDARD_HANDLE(IGESDraw_Drawing, IGESData_IGESEntity)
42 //! defines IGESDrawing, Type <404> Form <0>
43 //! in package IGESDraw
45 //! Specifies a drawing as a collection of annotation entities
46 //! defined in drawing space, and views which together
47 //! constitute a single representation of a part
48 class IGESDraw_Drawing : public IGESData_IGESEntity
54 Standard_EXPORT IGESDraw_Drawing();
56 //! This method is used to set the fields of the class
58 //! - allViews : Pointers to DEs of View entities
59 //! - allViewOrigins : Origin coordinates of transformed Views
60 //! - allAnnotations : Pointers to DEs of Annotation entities
61 //! raises exception if Lengths of allViews and allViewOrigins are
63 Standard_EXPORT void Init (const Handle(IGESDraw_HArray1OfViewKindEntity)& allViews, const Handle(TColgp_HArray1OfXY)& allViewOrigins, const Handle(IGESData_HArray1OfIGESEntity)& allAnnotations);
65 //! returns the number of view pointers in <me>
66 Standard_EXPORT Standard_Integer NbViews() const;
68 //! returns the ViewKindEntity indicated by ViewIndex
69 //! raises an exception if ViewIndex <= 0 or ViewIndex > NbViews().
70 Standard_EXPORT Handle(IGESData_ViewKindEntity) ViewItem (const Standard_Integer ViewIndex) const;
72 //! returns the Drawing space coordinates of the origin of the
73 //! Transformed view indicated by TViewIndex
74 //! raises an exception if TViewIndex <= 0 or TViewIndex > NbViews().
75 Standard_EXPORT gp_Pnt2d ViewOrigin (const Standard_Integer TViewIndex) const;
77 //! returns the number of Annotation entities in <me>
78 Standard_EXPORT Standard_Integer NbAnnotations() const;
80 //! returns the Annotation entity in this Drawing, indicated by the
82 //! raises an exception if AnnotationIndex <= 0 or
83 //! AnnotationIndex > NbAnnotations().
84 Standard_EXPORT Handle(IGESData_IGESEntity) Annotation (const Standard_Integer AnnotationIndex) const;
86 Standard_EXPORT gp_XY ViewToDrawing (const Standard_Integer NumView, const gp_XYZ& ViewCoords) const;
88 //! Returns the Drawing Unit Value if it is specified (by a
89 //! specific property entity)
90 //! If not specified, returns False, and val as zero :
91 //! unit to consider is then the model unit in GlobalSection
92 Standard_EXPORT Standard_Boolean DrawingUnit (Standard_Real& value) const;
94 //! Returns the Drawing Size if it is specified (by a
95 //! specific property entity)
96 //! If not specified, returns False, and X,Y as zero :
97 //! unit to consider is then the model unit in GlobalSection
98 Standard_EXPORT Standard_Boolean DrawingSize (Standard_Real& X, Standard_Real& Y) const;
103 DEFINE_STANDARD_RTTIEXT(IGESDraw_Drawing,IGESData_IGESEntity)
113 Handle(IGESDraw_HArray1OfViewKindEntity) theViews;
114 Handle(TColgp_HArray1OfXY) theViewOrigins;
115 Handle(IGESData_HArray1OfIGESEntity) theAnnotations;
126 #endif // _IGESDraw_Drawing_HeaderFile