782 lines
17 KiB
C++
782 lines
17 KiB
C++
#include "StdAfx.h"
|
|
#include "StdArx.h"
|
|
#include "dbproxy.h"
|
|
#include "geassign.h"
|
|
#include "acgi.h"
|
|
#include "TDbPartBase.h"
|
|
#include "TDbImpPartBase.h"
|
|
|
|
// #define VERSION_TDBPARTBASE 1
|
|
#define VERSION_TDBPARTBASE 2
|
|
|
|
//{{AFX_ARX_MACRO
|
|
ACRX_DXF_DEFINE_MEMBERS( TDbPartBase, TDbInterfacesObj,
|
|
AcDb::kDHL_CURRENT, AcDb::kMReleaseCurrent,
|
|
AcDbProxyEntity::kAllAllowedBits,
|
|
ATS_DBPARTBASE, "图形无法解析, 请下载上华软件|网址: www.shanghuasoft.com");
|
|
//}}AFX_ARX_MACRO
|
|
|
|
TDbPartBase::TDbPartBase()
|
|
{
|
|
//{{AFX_ARX_DATA_INIT(TDbPartBase)
|
|
//}}AFX_ARX_DATA_INIT
|
|
m_pImpPartBase = new TDbImpPartBase(this);
|
|
}
|
|
|
|
TDbPartBase::~TDbPartBase()
|
|
{
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
delete m_pImpPartBase;
|
|
}
|
|
}
|
|
|
|
BOOL TDbPartBase::GetInterface(int nIndex,TInterface& pipeInterface) const
|
|
{
|
|
assertReadEnabled();
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->GetInterface(nIndex,pipeInterface);
|
|
}
|
|
return FALSE;
|
|
}
|
|
|
|
BOOL TDbPartBase::GetInterface(const AcGePoint3d& ptCon,TInterface& pipeInterface) const
|
|
{
|
|
assertReadEnabled();
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->GetInterface(ptCon,pipeInterface);
|
|
}
|
|
return FALSE;
|
|
}
|
|
|
|
BOOL TDbPartBase::HasInterface(const AcGePoint3d& ptCon,const AcGeVector3d& vtDir)
|
|
{
|
|
assertReadEnabled();
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->HasInterface(ptCon,vtDir);
|
|
}
|
|
return FALSE;
|
|
}
|
|
|
|
int TDbPartBase::GetInterfaceCount() const
|
|
{
|
|
assertReadEnabled();
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->GetInterfaceCount();
|
|
}
|
|
return 0;
|
|
}
|
|
|
|
BOOL TDbPartBase::SetInterfaceRelation(const AcGePoint3d& ptConnect,const AcDbObjectId& idConnect)
|
|
{
|
|
assertWriteEnabled();
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->SetInterfaceRelation(ptConnect,idConnect);
|
|
}
|
|
return FALSE;
|
|
}
|
|
|
|
BOOL TDbPartBase::RemoveInterfaceRelation(const AcGePoint3d& ptConnect,const AcDbObjectId& idConnect)
|
|
{
|
|
assertWriteEnabled();
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->RemoveInterfaceRelation(ptConnect,idConnect);
|
|
}
|
|
return FALSE;
|
|
}
|
|
|
|
BOOL TDbPartBase::NotifyInterfaceToModify(const TInterfaceModifyMsg& iModiMsg,TInterfaceModifyMsgs& iModiMsgs)
|
|
{
|
|
assertWriteEnabled();
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->NotifyInterfaceToModify(iModiMsg,iModiMsgs);
|
|
}
|
|
return FALSE;
|
|
}
|
|
|
|
// TDbXDataMap* TDbPartBase::GetSpecialtyData()
|
|
// {
|
|
// if (m_pImpPartBase != NULL)
|
|
// {
|
|
// if (isWriteEnabled())
|
|
// {
|
|
// assertWriteEnabled();
|
|
// }
|
|
// else
|
|
// {
|
|
// assertReadEnabled();
|
|
// }
|
|
// return m_pImpPartBase->GetSpecialtyData();
|
|
// }
|
|
// return NULL;
|
|
// }
|
|
//
|
|
// TDbXDataMap* TDbPartBase::GetSpecialtyDataReadOnly() const
|
|
// {
|
|
// assertReadEnabled();
|
|
// if (m_pImpPartBase != NULL)
|
|
// {
|
|
// return m_pImpPartBase->GetSpecialtyData();
|
|
// }
|
|
// return NULL;
|
|
// }
|
|
|
|
void TDbPartBase::GetKindName(CString& sName)
|
|
{
|
|
assertReadEnabled();
|
|
sName = _T("TCH_DBFITTING");
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
m_pImpPartBase->GetKindName(sName);
|
|
}
|
|
}
|
|
|
|
BOOL TDbPartBase::ReCreateByXDataMap()
|
|
{
|
|
assertWriteEnabled();
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->ReCreateByXDataMap();
|
|
}
|
|
return FALSE;
|
|
}
|
|
|
|
BOOL TDbPartBase::AddCoverEdge(AcDbObjectId& id,TComplexCurve& curEdge)
|
|
{
|
|
return FALSE;
|
|
}
|
|
|
|
BOOL TDbPartBase::RemoveCoverEdge(AcDbObjectId& id)
|
|
{
|
|
return FALSE;
|
|
}
|
|
|
|
BOOL TDbPartBase::GetGeomExtentsEdge(TComplexCurve& crLoop)
|
|
{
|
|
return FALSE;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::setNormal(const AcGeVector3d& vtNorm)
|
|
{
|
|
assertWriteEnabled();
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->setNormal(vtNorm);
|
|
}
|
|
return Acad::eOk;
|
|
}
|
|
|
|
AcGeVector3d TDbPartBase::normal() const
|
|
{
|
|
assertReadEnabled();
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->normal();
|
|
}
|
|
return AcGeVector3d::kZAxis;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::copyFrom(const AcRxObject* pSrc)
|
|
{
|
|
assertWriteEnabled();
|
|
|
|
TDbInterfacesObj::copyFrom(pSrc);
|
|
|
|
Acad::ErrorStatus eState = Acad::eNotImplementedYet;
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
TDbPartBase* pFitting = TDbPartBase::cast(pSrc);
|
|
if (pFitting != NULL)
|
|
{
|
|
eState = m_pImpPartBase->copyFrom(pFitting->m_pImpPartBase);
|
|
|
|
if (cloneMeForDragging())
|
|
m_pImpPartBase->GetSpecialtyData()->SetAt(KEY_THISID,pFitting->objectId());
|
|
}
|
|
}
|
|
return Acad::eOk;
|
|
}
|
|
|
|
void TDbPartBase::subList() const
|
|
{
|
|
assertReadEnabled();
|
|
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
m_pImpPartBase->list();
|
|
}
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::subDeepClone(AcDbObject* pOwnerObject,
|
|
AcDbObject*& pClonedObject,
|
|
AcDbIdMapping& idMap,
|
|
Adesk::Boolean isPrimary) const
|
|
{
|
|
assertReadEnabled();
|
|
// return TDbInterfacesObj::subDeepClone(pOwnerObject,pClonedObject,idMap,isPrimary);
|
|
Acad::ErrorStatus es = TDbInterfacesObj::subDeepClone(pOwnerObject,pClonedObject,idMap,isPrimary);
|
|
|
|
// add by hh 2011-12-07
|
|
if (pClonedObject != NULL)
|
|
{
|
|
TDbPartBase* pBase = TDbPartBase::cast(pClonedObject);
|
|
if (pBase != NULL)
|
|
{
|
|
TDbXDataMap* pMapClone = NULL;
|
|
TDbXDataMap* pMapThis = m_pImpPartBase->GetSpecialtyData();
|
|
|
|
if ( pBase->m_pImpPartBase != NULL)
|
|
{
|
|
pMapClone = pBase->m_pImpPartBase->GetSpecialtyData();
|
|
}
|
|
|
|
if ( pMapThis != NULL)
|
|
{
|
|
pMapThis->BeginCloneXlation(pMapClone,idMap);
|
|
}
|
|
}
|
|
}
|
|
return es;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::subWblockClone( AcRxObject* pOwnerObject,
|
|
AcDbObject*& pClonedObject,
|
|
AcDbIdMapping& idMap,
|
|
Adesk::Boolean isPrimary) const
|
|
{
|
|
assertReadEnabled();
|
|
|
|
Acad::ErrorStatus es = TDbInterfacesObj::subWblockClone(pOwnerObject, pClonedObject, idMap, isPrimary);
|
|
if (pClonedObject != NULL)
|
|
{
|
|
TDbPartBase* pBase = TDbPartBase::cast(pClonedObject);
|
|
if (pBase != NULL)
|
|
{
|
|
TDbXDataMap* pMapClone = NULL;
|
|
TDbXDataMap* pMapThis = m_pImpPartBase->GetSpecialtyData();
|
|
|
|
if ( pBase->m_pImpPartBase != NULL)
|
|
{
|
|
pMapClone = pBase->m_pImpPartBase->GetSpecialtyData();
|
|
}
|
|
|
|
if ( pMapThis != NULL)
|
|
{
|
|
pMapThis->BeginCloneXlation(pMapClone,idMap);
|
|
}
|
|
}
|
|
}
|
|
return Acad::eOk;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::dwgInFields(AcDbDwgFiler* pFiler)
|
|
{
|
|
assertWriteEnabled();
|
|
Acad::ErrorStatus es;
|
|
|
|
// Call dwgInFields from TDbInterfacesObj
|
|
if ((es = TDbInterfacesObj::dwgInFields(pFiler)) != Acad::eOk)
|
|
{
|
|
return es;
|
|
}
|
|
|
|
// Read version number.
|
|
Adesk::UInt16 version;
|
|
pFiler->readItem(&version);
|
|
if (version > VERSION_TDBPARTBASE)
|
|
return Acad::eMakeMeProxy;
|
|
|
|
AcDbSoftPointerId idThis;
|
|
/*switch (version)
|
|
{
|
|
case (1):
|
|
{
|
|
pFiler->readItem(&idThis);
|
|
m_pImpPartBase->dwgInFields(pFiler);
|
|
if (m_pImpPartBase->GetSpecialtyData() != NULL)
|
|
{
|
|
m_pImpPartBase->GetSpecialtyData()->SetAt(KEY_THISID,idThis);
|
|
}
|
|
break;
|
|
}
|
|
default:
|
|
break;
|
|
}*/
|
|
// add by hh 2013-9-2 设置图纸版本 用于在imp类中处理版本问题
|
|
pFiler->readItem(&idThis);
|
|
m_pImpPartBase->SetVersion(version);
|
|
m_pImpPartBase->dwgInFields(pFiler);
|
|
if(2 > version)
|
|
{
|
|
if (m_pImpPartBase->GetSpecialtyData() != NULL)
|
|
{
|
|
m_pImpPartBase->GetSpecialtyData()->SetAt(KEY_THISID,idThis);
|
|
}
|
|
}
|
|
return pFiler->filerStatus();
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::dwgOutFields(AcDbDwgFiler* pFiler) const
|
|
{
|
|
assertReadEnabled();
|
|
Acad::ErrorStatus es;
|
|
|
|
// Call dwgOutFields from TDbInterfacesObj
|
|
if ((es = TDbInterfacesObj::dwgOutFields(pFiler)) != Acad::eOk)
|
|
{
|
|
return es;
|
|
}
|
|
|
|
// Write version number.
|
|
// change by hh 2013-9-2 另存为9以下图纸时,版本号置为1
|
|
// pFiler->writeItem((Adesk::UInt16) VERSION_TDBPARTBASE);
|
|
if (g_nSaveTArchVer <= 9)
|
|
pFiler->writeItem((Adesk::UInt16) 1);
|
|
else
|
|
pFiler->writeItem((Adesk::UInt16) VERSION_TDBPARTBASE);
|
|
|
|
pFiler->writeItem(AcDbSoftPointerId(objectId()));
|
|
m_pImpPartBase->dwgOutFields(pFiler);
|
|
return pFiler->filerStatus();
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::dxfInFields(AcDbDxfFiler* pFiler)
|
|
{
|
|
assertWriteEnabled();
|
|
struct resbuf rb;
|
|
|
|
if ((TDbInterfacesObj::dxfInFields(pFiler) != Acad::eOk) ||
|
|
!pFiler->atSubclassData(_T("TDbPartBase")))
|
|
return pFiler->filerStatus();
|
|
|
|
// Read version number.
|
|
pFiler->readItem(&rb);
|
|
if (rb.restype != AcDb::kDxfInt16)
|
|
{
|
|
pFiler->pushBackItem();
|
|
pFiler->setError(Acad::eInvalidDxfCode,
|
|
_T("Error: expected object version group code %d"),
|
|
AcDb::kDxfInt16);
|
|
return pFiler->filerStatus();
|
|
}
|
|
else
|
|
{
|
|
Adesk::UInt16 version = rb.resval.rint;
|
|
if (version > VERSION_TDBPARTBASE)
|
|
return Acad::eMakeMeProxy;
|
|
}
|
|
return pFiler->filerStatus();
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::dxfOutFields(AcDbDxfFiler* pFiler) const
|
|
{
|
|
assertReadEnabled();
|
|
Acad::ErrorStatus es;
|
|
|
|
if ((es = TDbInterfacesObj::dxfOutFields(pFiler)) != Acad::eOk)
|
|
return es;
|
|
|
|
// Write subclass marker.
|
|
pFiler->writeItem(AcDb::kDxfSubclass, _T("TDbPartBase"));
|
|
|
|
// Write version number.
|
|
pFiler->writeItem(AcDb::kDxfInt16, (Adesk::UInt16) VERSION_TDBPARTBASE);
|
|
return es;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::extend(Adesk::Boolean extendStart,
|
|
const AcGePoint3d& toPoint)
|
|
{
|
|
assertWriteEnabled();
|
|
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->extend(extendStart,toPoint);
|
|
}
|
|
return Acad::eOk;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::extend(double newParam)
|
|
{
|
|
assertWriteEnabled();
|
|
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
m_pImpPartBase->extend(newParam);
|
|
}
|
|
return Acad::eOk;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::subGetClassID(CLSID* pClsid) const
|
|
{
|
|
assertReadEnabled();
|
|
return AcDbEntity::subGetClassID(pClsid);
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::getClosestPointTo(const AcGePoint3d& givenPnt,
|
|
AcGePoint3d& pointOnCurve,
|
|
Adesk::Boolean extend) const
|
|
{
|
|
assertReadEnabled();
|
|
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->getClosestPointTo(givenPnt,pointOnCurve,extend);
|
|
}
|
|
return Acad::eInvalidInput;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::getClosestPointTo(const AcGePoint3d& givenPnt,
|
|
const AcGeVector3d& direction,
|
|
AcGePoint3d& pointOnCurve,
|
|
Adesk::Boolean extend) const
|
|
{
|
|
assertReadEnabled();
|
|
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->getClosestPointTo(givenPnt,direction,pointOnCurve,extend);
|
|
}
|
|
return Acad::eInvalidInput;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::getDistAtParam(double param,
|
|
double& dist) const
|
|
{
|
|
assertReadEnabled();
|
|
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->getDistAtParam(param,dist);
|
|
}
|
|
return Acad::eInvalidInput;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::getDistAtPoint(const AcGePoint3d& x0,
|
|
double& x1)const
|
|
{
|
|
assertReadEnabled();
|
|
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->getDistAtPoint(x0,x1);
|
|
}
|
|
return Acad::eInvalidInput;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::getEndParam(double& x0) const
|
|
{
|
|
assertReadEnabled();
|
|
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->getEndParam(x0);
|
|
}
|
|
return Acad::eInvalidInput;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::getEndPoint(AcGePoint3d& x0) const
|
|
{
|
|
assertReadEnabled();
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->getEndPoint(x0);
|
|
}
|
|
return Acad::eInvalidInput;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::getFirstDeriv(const AcGePoint3d& x0,
|
|
AcGeVector3d& firstDeriv) const
|
|
{
|
|
assertReadEnabled();
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->getFirstDeriv(x0,firstDeriv);
|
|
}
|
|
return Acad::eInvalidInput;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::getFirstDeriv(double param,
|
|
AcGeVector3d& firstDeriv) const
|
|
{
|
|
assertReadEnabled();
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->getFirstDeriv(param,firstDeriv);
|
|
}
|
|
return Acad::eInvalidInput;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::subGetGeomExtents(AcDbExtents& extents) const
|
|
{
|
|
assertReadEnabled();
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->getGeomExtents(extents);
|
|
}
|
|
return Acad::eInvalidInput;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::subGetGripPoints(AcGePoint3dArray& gripPoints,
|
|
AcDbIntArray& osnapModes,
|
|
AcDbIntArray& geomIds) const
|
|
{
|
|
assertReadEnabled();
|
|
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->getGripPoints(gripPoints,osnapModes,geomIds);
|
|
}
|
|
return Acad::eInvalidInput;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::getOffsetCurves(double offsetDist,
|
|
AcDbVoidPtrArray& offsetCurves) const
|
|
{
|
|
assertReadEnabled();
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->getOffsetCurves(offsetDist,offsetCurves);
|
|
}
|
|
return Acad::eInvalidInput;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::subGetOsnapPoints(AcDb::OsnapMode osnapMode,
|
|
INT_PTR gsSelectionMark,
|
|
const AcGePoint3d& pickPoint,
|
|
const AcGePoint3d& lastPoint,
|
|
const AcGeMatrix3d& viewXform,
|
|
AcGePoint3dArray& snapPoints,
|
|
AcDbIntArray& geomIds) const
|
|
{
|
|
assertReadEnabled();
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->getOsnapPoints(osnapMode,gsSelectionMark,pickPoint,
|
|
lastPoint,viewXform,snapPoints,geomIds);
|
|
}
|
|
return Acad::eInvalidInput;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::getParamAtDist(double dist,
|
|
double& param) const
|
|
{
|
|
assertReadEnabled();
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->getParamAtDist(dist,param);
|
|
}
|
|
return Acad::eInvalidInput;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::getParamAtPoint(const AcGePoint3d& x0,
|
|
double& x1)const
|
|
{
|
|
assertReadEnabled();
|
|
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->getParamAtPoint(x0,x1);
|
|
}
|
|
return Acad::eInvalidInput;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::getPointAtDist(double x0,
|
|
AcGePoint3d& x1) const
|
|
{
|
|
assertReadEnabled();
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->getPointAtDist(x0,x1);
|
|
}
|
|
return Acad::eInvalidInput;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::getPointAtParam(double x0,
|
|
AcGePoint3d& x1) const
|
|
{
|
|
assertReadEnabled();
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->getPointAtParam(x0,x1);
|
|
}
|
|
return Acad::eInvalidInput;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::getSplitCurves(const AcGeDoubleArray& params,
|
|
AcDbVoidPtrArray& curveSegments) const
|
|
{
|
|
assertReadEnabled();
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->getSplitCurves(params,curveSegments);
|
|
}
|
|
return Acad::eInvalidInput;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::getSplitCurves(const AcGePoint3dArray& points,
|
|
AcDbVoidPtrArray& curveSegments) const
|
|
{
|
|
assertReadEnabled();
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->getSplitCurves(points,curveSegments);
|
|
}
|
|
return Acad::eInvalidInput;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::getStartParam(double& x0) const
|
|
{
|
|
assertReadEnabled();
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->getStartParam(x0);
|
|
}
|
|
return Acad::eInvalidInput;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::getStartPoint(AcGePoint3d& x0) const
|
|
{
|
|
assertReadEnabled();
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->getStartPoint(x0);
|
|
}
|
|
return Acad::eInvalidInput;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::subGetStretchPoints(AcGePoint3dArray& stretchPoints) const
|
|
{
|
|
assertReadEnabled();
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->getStretchPoints(stretchPoints);
|
|
}
|
|
return Acad::eInvalidInput;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::subGetTransformedCopy(const AcGeMatrix3d& xform,
|
|
AcDbEntity*& pEnt) const
|
|
{
|
|
assertReadEnabled();
|
|
|
|
pEnt = new TDbPartBase;
|
|
(TDbPartBase*)pEnt->copyFrom(this);
|
|
pEnt->transformBy(xform);
|
|
|
|
return Acad::eOk;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::subIntersectWith(const AcDbEntity* pEnt,
|
|
AcDb::Intersect intType,
|
|
AcGePoint3dArray& points,
|
|
INT_PTR thisGsMarker,
|
|
INT_PTR otherGsMarker) const
|
|
{
|
|
assertReadEnabled();
|
|
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->intersectWith(pEnt,intType,
|
|
points,thisGsMarker,
|
|
otherGsMarker);
|
|
}
|
|
return Acad::eInvalidInput;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::subIntersectWith(const AcDbEntity* pEnt,
|
|
AcDb::Intersect intType,
|
|
const AcGePlane& projPlane,
|
|
AcGePoint3dArray& points,
|
|
INT_PTR thisGsMarker,
|
|
INT_PTR otherGsMarker) const
|
|
{
|
|
assertReadEnabled();
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->intersectWith(pEnt,intType,projPlane,points,thisGsMarker,otherGsMarker);
|
|
}
|
|
return Acad::eInvalidInput;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::subMoveGripPointsAt(const AcDbIntArray& indices,
|
|
const AcGeVector3d& offset)
|
|
{
|
|
assertWriteEnabled();
|
|
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->moveGripPointsAt(indices,offset);
|
|
}
|
|
return Acad::eInvalidInput;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::subMoveStretchPointsAt(const AcDbIntArray& indices,
|
|
const AcGeVector3d& offset)
|
|
{
|
|
assertWriteEnabled();
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->moveStretchPointsAt(indices,offset);
|
|
}
|
|
return Acad::eInvalidInput;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::subTransformBy(const AcGeMatrix3d& xform)
|
|
{
|
|
assertWriteEnabled();
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->transformBy(xform);
|
|
}
|
|
return Acad::eOk;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::ExplodeOrDraw2d(XExplodeDraw &mode) const
|
|
{
|
|
assertReadEnabled();
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->ExplodeOrDraw2d(mode);
|
|
}
|
|
return Acad::eOk;
|
|
}
|
|
|
|
Acad::ErrorStatus TDbPartBase::ExplodeOrDraw3d(XExplodeDraw &mode) const
|
|
{
|
|
assertReadEnabled();
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
m_pImpPartBase->ExplodeOrDraw3d(mode);
|
|
return Acad::eOk;
|
|
}
|
|
return Acad::eNotImplementedYet;
|
|
}
|
|
|
|
BOOL TDbPartBase::MakeCurves(TComplexCurve& cplCurve) const
|
|
{
|
|
assertReadEnabled();
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->MakeCurves(cplCurve);
|
|
}
|
|
return FALSE;
|
|
}
|
|
|
|
AcDbPolyline* TDbPartBase::MakePolyCurve() const
|
|
{
|
|
assertReadEnabled();
|
|
if (m_pImpPartBase != NULL)
|
|
{
|
|
return m_pImpPartBase->MakePolyCurve();
|
|
}
|
|
return NULL;
|
|
}
|