42cf5bc1 |
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 |
5 | // |
6 | // This file is part of Open CASCADE Technology software library. |
7 | // |
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. |
13 | // |
14 | // Alternatively, this file may be used under the terms of Open CASCADE |
15 | // commercial license or contractual agreement. |
16 | |
17 | #ifndef _IGESDraw_Drawing_HeaderFile |
18 | #define _IGESDraw_Drawing_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_Type.hxx> |
22 | |
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; |
33 | class gp_Pnt2d; |
34 | class IGESData_IGESEntity; |
35 | class gp_XY; |
36 | class gp_XYZ; |
37 | |
38 | |
39 | class IGESDraw_Drawing; |
40 | DEFINE_STANDARD_HANDLE(IGESDraw_Drawing, IGESData_IGESEntity) |
41 | |
42 | //! defines IGESDrawing, Type <404> Form <0> |
43 | //! in package IGESDraw |
44 | //! |
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 |
49 | { |
50 | |
51 | public: |
52 | |
53 | |
54 | Standard_EXPORT IGESDraw_Drawing(); |
55 | |
56 | //! This method is used to set the fields of the class |
57 | //! Drawing |
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 |
62 | //! not same. |
63 | Standard_EXPORT void Init (const Handle(IGESDraw_HArray1OfViewKindEntity)& allViews, const Handle(TColgp_HArray1OfXY)& allViewOrigins, const Handle(IGESData_HArray1OfIGESEntity)& allAnnotations); |
64 | |
65 | //! returns the number of view pointers in <me> |
66 | Standard_EXPORT Standard_Integer NbViews() const; |
67 | |
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; |
71 | |
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; |
76 | |
77 | //! returns the number of Annotation entities in <me> |
78 | Standard_EXPORT Standard_Integer NbAnnotations() const; |
79 | |
80 | //! returns the Annotation entity in this Drawing, indicated by the |
81 | //! AnnotationIndex |
82 | //! raises an exception if AnnotationIndex <= 0 or |
83 | //! AnnotationIndex > NbAnnotations(). |
84 | Standard_EXPORT Handle(IGESData_IGESEntity) Annotation (const Standard_Integer AnnotationIndex) const; |
85 | |
86 | Standard_EXPORT gp_XY ViewToDrawing (const Standard_Integer NumView, const gp_XYZ& ViewCoords) const; |
87 | |
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; |
93 | |
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; |
99 | |
100 | |
101 | |
102 | |
92efcf78 |
103 | DEFINE_STANDARD_RTTIEXT(IGESDraw_Drawing,IGESData_IGESEntity) |
42cf5bc1 |
104 | |
105 | protected: |
106 | |
107 | |
108 | |
109 | |
110 | private: |
111 | |
112 | |
113 | Handle(IGESDraw_HArray1OfViewKindEntity) theViews; |
114 | Handle(TColgp_HArray1OfXY) theViewOrigins; |
115 | Handle(IGESData_HArray1OfIGESEntity) theAnnotations; |
116 | |
117 | |
118 | }; |
119 | |
120 | |
121 | |
122 | |
123 | |
124 | |
125 | |
126 | #endif // _IGESDraw_Drawing_HeaderFile |