MGCL V10  V10
MGCL V10
 全て クラス 名前空間 関数 変数 型定義 列挙型 列挙値 フレンド グループ ページ
igespd508.h
1 /********************************************************************/
2 /* Copyright (c) 2015 DG Technologies Inc. and Yuzi Mizuno */
3 /* All rights reserved. */
4 /********************************************************************/
5 #if !defined( __MGIGESPD508_H__)
6 #define __MGIGESPD508_H__
7 
8 #include <vector>
9 #include <iosfwd>
10 #include "mg/Position.h"
11 #include "mgiges/IgesPD.h"
12 class MGEdge;
13 class MGBVertex;
14 class MGIgesIfstream;
15 
17 class MGIges508Edge{
18 public:
19 
20 MGIges508Edge(
21 ):m_type(0),m_edge_list(0),m_edge(0),m_orientation(0)
22 ,m_isoparameterics(1),m_pcurves(1){;};
23 
24 MGIges508Edge(
25 short type,
26 int edge_list,
28 int edge,
29 short orientation
30 ):m_type(type),m_edge_list(edge_list),m_edge(edge),m_orientation(orientation){;};
32 
34 friend std::ostream& operator<< (std::ostream&, const MGIges508Edge&);
35 
37 MGEdge* get_edge(const MGIgesIfstream& ifs)const;
38 
40 MGBVertex* get_BVertex(const MGIgesIfstream& ifs)const;
41 
42 bool is_vertex()const{return m_type!=0;};
43 bool direction_is_opposite()const{return m_orientation==0;};
44 int number_of_pcurves()const{return (int)(m_pcurves.size()-1);};
45 
47 void read_in(
48  char pDelimeter,
49  std::istringstream& pdstream
50 );
51 
58 void write_out_into_string(
59  const MGIgesGSec& gsec,
60  MGPvector<std::string>& plines
61 )const;
62 
63 public:
64  short m_type;
65  int m_edge_list;
68 
69  int m_edge;
70  short m_orientation;
71 
73  std::vector<bool> m_isoparameterics;
74 
76  std::vector<int> m_pcurves;
77 };
82 
84 class MGIgesPD508: public MGIgesPD{
85 public:
86  // Constructors.
87 
90 
93 
94  MGIges508Edge& edge(int i){return *(m_edges[i]);};
95  const MGIges508Edge& edge(int i)const{return *(m_edges[i]);};
96 
98  int number_of_edges()const{return (int)(m_edges.size()-1);};
99 
102  void push_back(MGIges508Edge* edge){m_edges.push_back(edge);};
103 
105  void read_in(
106  char pDelimeter,
107  std::istringstream& pdstream
108  );
109 
117  const MGIgesGSec& gsec,
118  MGPvector<std::string>& plines
119  )const;
120 
121 private:
122 
123 //Member data. These are set as public.
125  MGPvector<MGIges508Edge> m_edges;
126 };
128 
129 #endif // __MGIGESPD508_H__
MGBVertex is 0 manifold dimension binder cell, is an point.
Definition: BVertex.h:30
MGIgesPD508 is the class for Iges parameter data type 508(LOOP).
Definition: igespd508.h:84
const MGIgesDirectoryEntry * DEpointer() const
Definition: igesPD.h:39
MGIges508Edge & edge(int i)
Definition: igespd508.h:94
MGIgesPD508(MGIgesDirectoryEntry *DEpointer=0)
Constructs an object of class MGIgesPD508.
~MGIgesPD508()
Destructor;.
Definition: igespd508.h:92
std::ostream & operator<<(std::ostream &ostrm, const MGisect &is)
Debug Function.
Definition: isect.h:95
size_type size() const
Return the number of items that are in the sequence.
Definition: Pvector.h:342
MGIgesDirectoryEntry describes a directory entry section of an IGES file.
Definition: IgesDirectoryEntry.h:20
void push_back(MGIges508Edge *edge)
Definition: igespd508.h:102
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
MGIgesPD is the parent class of all the Parameter data section type.
Definition: igesPD.h:17
void push_back(T *x)
push element x at the end.
Definition: Pvector.h:250
int number_of_edges() const
Get the number of edges.
Definition: igespd508.h:98
const MGIges508Edge & edge(int i) const
Definition: igespd508.h:95
MGIgesGSec describes a Global Section of a IGES file.
Definition: IgesGSec.h:18
void write_out_into_string(const MGIgesGSec &gsec, MGPvector< std::string > &plines) const
Defines Vector of newed object pointers.
Definition: Pvector.h:27
void read_in(char pDelimeter, std::istringstream &pdstream)
Read in parameter data from string stream data.