//-----------------------------------------------------------------------------+ // Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd. // = FileName : TPGeGridCell.cpp // = Version : ver2.0 // = Author : xlc // = CreateDate : 2002-09-09 // = Description: ÀàµÄ¶¨Òå // = Maintainers: // //-----------------------------------------------------------------------------+ #include "StdAfx.h" #include "TPGeGridCell.h" #include "TPGeGridNode.h" #include "TPGeGridSeg.h" TPGeGridCell::~TPGeGridCell() { } bool TPGeGridCell::operator <(const TPGeGridCell&)const { return false; } bool TPGeGridCell::operator >(const TPGeGridCell&)const { return false; } void TPGeGridCell::Make3DFace(const TPGeCurve2D &outline,TGObjectList&mlines) { TDualPtrList lstPt; if (m_allNode[0]->IsVisibleNode()) { lstPt << *m_allNode[0]; } if (m_allSeg[0] != NULL) { lstPt << m_allSeg[0]->m_lstCutPoint; } if (m_allNode[1]->IsVisibleNode()) { lstPt << *m_allNode[1]; } if (m_allSeg[1] != NULL) { lstPt << m_allSeg[1]->m_lstCutPoint; } if (m_allNode[2]->IsVisibleNode()) { lstPt << *m_allNode[2]; } if (m_allSeg[2] != NULL) { const TDualPtrList &lstCut = m_allSeg[2]->m_lstCutPoint; for (long i = lstCut.GetLength() - 1; i >= 0; i--) { lstPt << lstCut.GetAt(i); } } if (m_allNode[3]->IsVisibleNode()) { lstPt << *m_allNode[3]; } if (m_allSeg[3] != NULL) { const TDualPtrList &lstCut = m_allSeg[3]->m_lstCutPoint; for (long i = lstCut.GetLength() - 1; i >= 0; i--) { lstPt << lstCut.GetAt(i); } } if (lstPt.GetLength() < 3) { return; } TGMLine2D *pMline = new TGMLine2D(lstPt.GetLength(),true); for (lstPt.MoveToFirst();!lstPt.IsOut();lstPt.MoveToNext()) { (*pMline)[lstPt.GetCur()] = lstPt.GetCurData(); } mlines << pMline; }