MGCL V10  V10
MGCL V10
 全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
IgesIfstream.h
1 /********************************************************************/
2 /* Copyright (c) 2015 DG Technologies Inc. and Yuzi Mizuno */
3 /* All rights reserved. */
4 /********************************************************************/
5 #if !defined( __IGESIFSTREAM_H__)
6 #define __IGESIFSTREAM_H__
7 
11 
12 #include <fstream>
13 #include "mg/Straight.h"
14 #include "mg/LBRep.h"
15 #include "mg/RLBRep.h"
16 #include "mg/SBRep.h"
17 #include "mg/RSBRep.h"
18 #include "mg/Plane.h"
19 #include "mg/Sphere.h"
20 #include "mgIges/IgesFstream.h"
21 #include "mgIges/IgesFstream.h"
22 #include "mgIges/IgesVertexListMap.h"
23 #include "mgIges/Iges504EdgeListMap.h"
24 
25 // forward declarations
26 class MGObject;
27 class MGCurve;
28 class MGSurface;
29 class MGGroup;
30 class MGGel;
31 class MGColor;
32 class MGBVertex;
33 class MGEdge;
34 class MGLoop;
35 class MGFace;
36 class MGShell;
37 
42 class MGIgesIfstream: public MGIgesFstream{
44 
45 public:
48 
51 
53 
55  MG_DLL_DECLR MGIgesIfstream(const TCHAR* filename);
56 
59  MG_DLL_DECLR bool good()const{return m_ifstream.good();};
60 
62 
65  MG_DLL_DECLR MGIgesIfstream& operator>>(MGGroup&);
66 
68 
74  int i
75  )const;
77  const MGIgesDirectoryEntry& de
78  )const;
79 
81  MG_DLL_DECLR bool is_open(){return m_ifstream.is_open();};
82 
85  MG_DLL_DECLR void open(const TCHAR* filename);
86  MG_DLL_DECLR void close();
87 
89  void get_one_line(
90  char* lineData,
91  char& sectionID_letter,
94  int& sequence,
95  int nchar=72
96  );
98 
102  const MGIgesDirectoryEntry& de
103  )const;
104 
107  const MGIgesDirectoryEntry& de
108  )const;
109 
113  const MGIgesDirectoryEntry& de
114  )const;
115 
119  const MGIgesDirectoryEntry& de
120  )const;
121 
125  const MGIgesDirectoryEntry& de
126  )const;
127 
131  const MGIgesDirectoryEntry& de
132  )const;
133 
138  const MGIgesDirectoryEntry& de
139  )const;
140 
145  const MGIgesDirectoryEntry& de
146  )const;
147 
150  const MGIgesDirectoryEntry& de
151  )const;
152 
156  const MGIgesDirectoryEntry& de
157  )const;
158 
162  const MGIgesDirectoryEntry& d
163  )const;
164 
168  const MGIgesDirectoryEntry& de
169  )const;
170 
174  const MGIgesDirectoryEntry& de
175  )const;
176 
180  const MGIgesDirectoryEntry& de
181  )const;
182 
186  const MGIgesDirectoryEntry& de
187  )const;
188 
192  const MGIgesDirectoryEntry& de
193  )const;
194 
198  const MGIgesDirectoryEntry& de
199  )const;
200 
204  const MGIgesDirectoryEntry& de
205  )const;
206 
210  const MGIgesDirectoryEntry& de
211  )const;
212 
218  const MGIgesDirectoryEntry& de
219  )const;
220 
225  const MGIgesDirectoryEntry& de
226  )const;
227 
230  int vertex_list,
231  int vertex
232  )const;
233 
236  int edge_list,
237  int edge
238  )const;
239 
243  const MGIgesDirectoryEntry& de,
244  const MGSurface& srf
245  )const;
246 
250  const MGIgesDirectoryEntry& de
251  )const;
252 
256  const MGIgesDirectoryEntry& de
257  )const;
258 
260  void initialize();
261 
263  void transform(
264  const MGIgesDirectoryEntry& de,
265  MGGel& obj
266  )const;
267 
268 private:
269  std::ifstream m_ifstream;
270 
271 };
272  // end of FileInputOutput group
274 #endif // __IGESIFSTREAM_H__
MGEdge * convert_edge(int edge_list, int edge) const
Convert an edge in type=504 edge list entries to MGEdge.
MGBVertex is 0 manifold dimension binder cell, is an point.
Definition: BVertex.h:30
MGIgesVertexListMap m_vertexListMap
VERTEX list of the directory entry of type 502 vertex.
Definition: IgesIfstream.h:47
MGCurve is an abstract class which represents a whole curve.
Definition: Curve.h:63
MGPlane is infinite plane in 3D space.
Definition: Plane.h:38
MGEllipse * convert_arc(const MGIgesDirectoryEntry &de) const
Convert de to MGEllipse(a newed object). de must be of type 100(Circular Arc).
MGCylinder is a Cylinder in 3D space.
Definition: Cylinder.h:37
MGPoint represents one dimensional manifold, a point in a space.
Definition: Point.h:28
MGBVertex * convert_vertex(int vertex_list, int vertex) const
Convert de(type=502: VERTEX List entries) to MGGroup.
MGCompositeCurve is a composite of other leaf curves.
Definition: CompositeCurve.h:39
void get_one_line(char *lineData, char &sectionID_letter, int &sequence, int nchar=72)
From the current stream position, get one line data.
MGIges504EdgeListMap m_edgeListMap
EDGE list of the directory entry of type 504 edge.
Definition: IgesIfstream.h:50
MGLoop * convert_loop(const MGIgesDirectoryEntry &de, const MGSurface &srf) const
MGObject * convert_plane(const MGIgesDirectoryEntry &de) const
MGLBRep * convert_spline(const MGIgesDirectoryEntry &d) const
MGSurface * convert_nurbs_surface(const MGIgesDirectoryEntry &de) const
MG_DLL_DECLR MGIgesIfstream(const TCHAR *filename)
Constructors.
MGSurface * convert_ruled_surface(const MGIgesDirectoryEntry &de) const
MGLBRep is a class for B-SPline representation.
Definition: LBRep.h:41
MGIgesDirectoryEntry describes a directory entry section of an IGES file.
Definition: IgesDirectoryEntry.h:20
MGObject * convert_conic_arc(const MGIgesDirectoryEntry &de) const
Is an abstract class which represents a whole geometry and a topology.
Definition: Object.h:42
MGShell is a composition of MGFace's(trimmed surface).
Definition: Shell.h:32
MGPlane * convert_planeSurface(const MGIgesDirectoryEntry &de) const
MGColor defines the OpenGL color (R,G,B,A).
Definition: Color.h:26
void initialize()
initialization
MGFace is a trimmed surface.
Definition: Face.h:51
MGGel * convert_MSBO(const MGIgesDirectoryEntry &de) const
MGGel is an abstract class which represents a group element.
Definition: Gel.h:53
MGGel * convert_to_gel(int i) const
Member functions.
MGEdge is an instance of MGCellNB, represents a boundary element of 2D manifold.
Definition: Edge.h:33
MGIgesIfstream read in *.iges; *.igs file, transforming IGES objects to MGCL objects.
Definition: IgesIfstream.h:43
MGStraight is a curve of any space dimension, represent a straight line.
Definition: Straight.h:49
MGCylinder * convert_cylinder(const MGIgesDirectoryEntry &de) const
MGShell * convert_shell(const MGIgesDirectoryEntry &de) const
MG_DLL_DECLR bool is_open()
Test if input stream is open.
Definition: IgesIfstream.h:81
MGSurface is an abstract class of 3D surface.
Definition: Surface.h:54
MGLoop is a boundary of a face, a boundary of 2D manifold cell.
Definition: Loop.h:44
MGCompositeCurve * convert_composite(const MGIgesDirectoryEntry &de) const
MGIgesFstream is a super class for MGIfstream and MGOfstream.
Definition: Igesfstream.h:24
MGFace * convert_trimmed_surface(const MGIgesDirectoryEntry &de) const
MGColor * convert_color(const MGIgesDirectoryEntry &de) const
MGSphere is a Sphere in 3D space.
Definition: Sphere.h:42
MGSphere * convert_sphere158(const MGIgesDirectoryEntry &de) const
Convert de to MGObject(a newed object). de must be of type 158(SPHERE).
MGSurface * convert_revolution_surface(const MGIgesDirectoryEntry &de) const
MGSurface * convert_tab_cyl(const MGIgesDirectoryEntry &de) const
Is the class to store MGEdge*(newed objects) generated for MGIges504 EDGE list.
Definition: iges504EdgeListMap.h:16
MGFace * convert_bounded_surface(const MGIgesDirectoryEntry &de) const
Is the class to store MGBVertex*(newed objects) generated for MGIges502 Vertices list.
Definition: igesVertexListMap.h:16
MG_DLL_DECLR bool good() const
Definition: IgesIfstream.h:59
MGStraight * convert_line(const MGIgesDirectoryEntry &de) const
MG_DLL_DECLR void close()
MGGroup is a class which constains MGGel elements.
Definition: Group.h:35
MGFace * convert_face(const MGIgesDirectoryEntry &de) const
MGGroup * convert_group(const MGIgesDirectoryEntry &de) const
MGEllipse is a class to define an ellipse of 2D or 3D.
Definition: Ellipse.h:38
MGCurve * convert_nurbs(const MGIgesDirectoryEntry &de) const
MG_DLL_DECLR MGIgesIfstream & operator>>(MGGroup &)
Operator overload.
void transform(const MGIgesDirectoryEntry &de, MGGel &obj) const
Transform obj if de has the transformation matrix.
MGSphere * convert_sphere(const MGIgesDirectoryEntry &de) const
MG_DLL_DECLR void open(const TCHAR *filename)
MGPoint * convert_point(const MGIgesDirectoryEntry &de) const