145 lines
4.6 KiB
C++
145 lines
4.6 KiB
C++
//-------------------------------------------------------------------------------------------------------+
|
|
// Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd.
|
|
// = FileName : TDbPolyCurveEnt.h
|
|
// = Version : ver2.0
|
|
// = Author : xlc
|
|
// = CreateDate : 2002-09-09
|
|
// = Description: 路径曲线类的声明
|
|
// = Maintainers:
|
|
//
|
|
//-------------------------------------------------------------------------------------------------------+
|
|
#ifndef _TDBPOLYCURVEENT_H_
|
|
#define _TDBPOLYCURVEENT_H_
|
|
|
|
#ifndef _TDBCURVEENTITY_H_
|
|
#include "TDbCurveEntity.h"
|
|
#endif
|
|
|
|
#ifndef _TGGEPOLY3D_H_
|
|
#include "TGGePoly3D.h"
|
|
#endif
|
|
|
|
#ifndef _TOBJINFOUNIT_H_
|
|
#include "TObjInfoUnit.h"
|
|
#endif
|
|
|
|
#ifndef Migration_H_
|
|
#include "TMigration.h"
|
|
#endif
|
|
|
|
class GEOAPI TDbPolyCurveEnt: public TDbCurveEntity
|
|
{
|
|
DECLARE_TENTBASE();
|
|
|
|
ACRX_DECLARE_MEMBERS(TDbPolyCurveEnt);
|
|
|
|
public:
|
|
TDbPolyCurveEnt();
|
|
virtual ~TDbPolyCurveEnt();
|
|
|
|
//重载 TEntityBase
|
|
virtual int GetFirstVersion()const;
|
|
//取动态属性显示数据
|
|
virtual void GetTips(TDPtrList<TObjInfoUnit> &lstInfo) const;
|
|
|
|
virtual Acad::ErrorStatus GetGripText(int i, CString &cs) const;
|
|
|
|
virtual BOOL IsValid() const;
|
|
|
|
virtual void CopyPropertiesFrom(AcDbEntity *pSrcEntity, unsigned gMatchFlag);
|
|
|
|
#if ADS > 15
|
|
|
|
virtual void CreateGrip();
|
|
virtual Acad::ErrorStatus EntityToDim(long iGrip,long iDim,const AcDbEntity*pEnt);
|
|
virtual Acad::ErrorStatus DimToEntity(long iGrip,long iDim,double newValue,const AcGeVector3d& offset);
|
|
|
|
#endif
|
|
|
|
virtual Acad::ErrorStatus GetPathPoly(TGGePoly2D &polyPath,AcGeVector3d&normal)const;
|
|
virtual Acad::ErrorStatus SetPathPoly(const TGGePoly2D &polyPath,const AcGeVector3d&normal);
|
|
|
|
//重载 TDbCurveEntity
|
|
virtual Acad::ErrorStatus SetBaseCurve(AcDbCurve*);
|
|
//临时对象,外部析构
|
|
virtual AcDbCurve* GetBaseCurve()const;
|
|
|
|
//重载 AcDbEntity
|
|
virtual Acad::ErrorStatus dwgOutFields(AcDbDwgFiler* pFiler) const;
|
|
virtual Acad::ErrorStatus dwgInFields (AcDbDwgFiler*);
|
|
virtual Acad::ErrorStatus dxfInFields (AcDbDxfFiler* pFiler);
|
|
virtual Acad::ErrorStatus dxfOutFields(AcDbDxfFiler*) const;
|
|
|
|
#if (ADS > 15 && ADS < 18)
|
|
virtual Acad::ErrorStatus subGetOsnapPoints(AcDb::OsnapMode osnapMode,
|
|
int gsSelectionMark,
|
|
const AcGePoint3d& pickPoint,
|
|
const AcGePoint3d& lastPoint,
|
|
const AcGeMatrix3d& viewXform,
|
|
AcGePoint3dArray& snapPoints,
|
|
AcDbIntArray& geomIds,
|
|
const AcGeMatrix3d& insertionMat) const;
|
|
virtual Acad::ErrorStatus subGetOsnapPoints(AcDb::OsnapMode osnapMode,
|
|
int gsSelectionMark,
|
|
const AcGePoint3d& pickPoint,
|
|
const AcGePoint3d& lastPoint,
|
|
const AcGeMatrix3d& viewXform,
|
|
AcGePoint3dArray& snapPoints,
|
|
AcDbIntArray& geomIds) const;
|
|
#endif
|
|
|
|
virtual Acad::ErrorStatus subGetGripPoints( AcGePoint3dArray& gripPoints,
|
|
AcDbIntArray& osnapModes,
|
|
AcDbIntArray& geomIds) const;
|
|
|
|
virtual Acad::ErrorStatus subGetStretchPoints(AcGePoint3dArray& stretchPoints)const;
|
|
|
|
virtual Acad::ErrorStatus subMoveGripPointsAt(const AcDbIntArray& indices,
|
|
const AcGeVector3d& offset);
|
|
|
|
virtual Acad::ErrorStatus subTransformBy(const AcGeMatrix3d&mat);
|
|
|
|
virtual Adesk::Boolean subWorldDraw(AcGiWorldDraw* pWd);
|
|
//重载 AcDbObject
|
|
virtual Acad::ErrorStatus subDeepClone( AcDbObject* pOwner,
|
|
AcDbObject*& pClonedObject,
|
|
AcDbIdMapping& idMap,
|
|
Adesk::Boolean isPrimary) const;
|
|
|
|
virtual void erased(const AcDbObject* pDbObj, Adesk::Boolean erasing = Adesk::kTrue);
|
|
|
|
virtual void modified(const AcDbObject* pDbObj);
|
|
|
|
|
|
// >0 命中顶点; <0 命中边; 0--没有命中,abs(nRet)-1 为命中目标序号
|
|
int HitTestOnBase2d(const TADSGePoint3d &ptTest, double nTol = TchGeLib::_DIST_SNAP) const;
|
|
|
|
void SetSweepAngleAt(int idx,double a);
|
|
void SetElevationAt(int idx,double e);
|
|
void SetNormal(AcGeVector3d vt);
|
|
void UnBind();
|
|
|
|
Acad::ErrorStatus SetBindObject(const AcDbObjectId &id);
|
|
|
|
BOOL IsBind() const;
|
|
BOOL AddVertex(const TADSGePoint3d &ptAdd);
|
|
BOOL RemoveVertexAt(int nPos);
|
|
|
|
void GetLocalMatrix(const AcGeMatrix3d& xform, ads_matrix &mat) const;
|
|
BOOL GetClosestPoint2d(const TADSGePoint3d &ptTest, TADSGePoint3d &ptOnCurve) const;
|
|
double GetElevationAt(int idx) const;
|
|
double GetSweepAngleAt(int idx) const;
|
|
|
|
AcDbObjectId GetBindObjectId() const;
|
|
AcGeVector3d GetNormal()const;
|
|
|
|
public:
|
|
static const Adesk::UInt8 g_nVersion;
|
|
|
|
protected:
|
|
AcDbSoftPointerId m_idBind; //绊定的实体
|
|
TGGePoly3D m_polyBase; //路径曲线
|
|
AcGeVector3d m_vtNormal; //法向
|
|
};
|
|
|
|
#endif |