1 // Created on: 1993-01-09
2 // Created by: CKY / Contract Toubro-Larsen ( Kiran )
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 _IGESGeom_CopiousData_HeaderFile
18 #define _IGESGeom_CopiousData_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_Type.hxx>
23 #include <Standard_Integer.hxx>
24 #include <Standard_Real.hxx>
25 #include <TColStd_HArray1OfReal.hxx>
26 #include <IGESData_IGESEntity.hxx>
27 #include <Standard_Boolean.hxx>
28 class Standard_OutOfRange;
33 class IGESGeom_CopiousData;
34 DEFINE_STANDARD_HANDLE(IGESGeom_CopiousData, IGESData_IGESEntity)
36 //! defines IGESCopiousData, Type <106> Form <1-3,11-13,63>
37 //! in package IGESGeom
38 //! This entity stores data points in the form of pairs,
39 //! triples, or sextuples. An interpretation flag value
40 //! signifies which of these forms is being used.
41 class IGESGeom_CopiousData : public IGESData_IGESEntity
47 Standard_EXPORT IGESGeom_CopiousData();
49 //! This method is used to set the fields of the class
51 //! - aDataType : Specifies whether data is a pair or a triple
53 //! - aZPlane : Common Z value for all points if datatype = 1
54 //! - allData : Data to be read in groups of 2, 3 or 6
55 Standard_EXPORT void Init (const Standard_Integer aDataType, const Standard_Real aZPlane, const Handle(TColStd_HArray1OfReal)& allData);
57 //! Sets Copious Data to be a Polyline if <mode> is True
58 //! (Form = 11-12-13) or a Set of Points else (Form 1-2-3)
59 Standard_EXPORT void SetPolyline (const Standard_Boolean mode);
61 //! Sets Copious Data to be a Closed Path 2D (Form 63)
62 //! Warning : DataType is not checked and must be set to ONE by Init
63 Standard_EXPORT void SetClosedPath2D();
65 //! Returns True if <me> is a Set of Points (Form 1-2-3)
66 Standard_EXPORT Standard_Boolean IsPointSet() const;
68 //! Returns True if <me> is a Polyline (Form 11-12-13)
69 Standard_EXPORT Standard_Boolean IsPolyline() const;
71 //! Returns True if <me> is a Closed Path 2D (Form 63)
72 Standard_EXPORT Standard_Boolean IsClosedPath2D() const;
75 //! 1 = XY ( with common Z given by plane)
77 //! 3 = XYZ + Vec(XYZ) (point + normal vector)
78 Standard_EXPORT Standard_Integer DataType() const;
80 //! returns the number of tuples
81 Standard_EXPORT Standard_Integer NbPoints() const;
83 //! Returns an individual Data, given the N0 of the Point
84 //! and the B0 of the Coordinate (according DataType)
85 Standard_EXPORT Standard_Real Data (const Standard_Integer NumPoint, const Standard_Integer NumData) const;
87 //! If datatype = 1, then returns common z value for all data
89 Standard_EXPORT Standard_Real ZPlane() const;
91 //! returns the coordinates of the point specified by the anIndex
92 //! raises exception if anIndex <= 0 or anIndex > NbPoints()
93 Standard_EXPORT gp_Pnt Point (const Standard_Integer anIndex) const;
95 //! returns the coordinates of the point specified by the anIndex
96 //! after applying Transf. Matrix
97 //! raises exception if anIndex <= 0 or anIndex > NbPoints()
98 Standard_EXPORT gp_Pnt TransformedPoint (const Standard_Integer anIndex) const;
100 //! returns i, j, k values if 3-tuple else returns (0, 0, 0)
101 //! raises exception if anIndex <= 0 or anIndex > NbPoints()
102 Standard_EXPORT gp_Vec Vector (const Standard_Integer anIndex) const;
104 //! returns transformed vector if 3-tuple else returns (0, 0, 0)
105 //! raises exception if anIndex <= 0 or anIndex > NbPoints()
106 Standard_EXPORT gp_Vec TransformedVector (const Standard_Integer anIndex) const;
111 DEFINE_STANDARD_RTTIEXT(IGESGeom_CopiousData,IGESData_IGESEntity)
121 Standard_Integer theDataType;
122 Standard_Real theZPlane;
123 Handle(TColStd_HArray1OfReal) theData;
134 #endif // _IGESGeom_CopiousData_HeaderFile