///////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2003-2011, Open Design Alliance (the "Alliance").
// All rights reserved.
//
// This software and its documentation and related materials are owned by
// the Alliance. The software may only be incorporated into application
// programs owned by members of the Alliance, subject to a signed
// Membership Agreement and Supplemental Software License Agreement with the
// Alliance. The structure and organization of this software are the valuable
// trade secrets of the Alliance and its suppliers. The software is also
// protected by copyright law and international treaty provisions. Application
// programs incorporating this software must include the following statement
// with their copyright notices:
//
// This application incorporates Teigha(R) software pursuant to a license
// agreement with Open Design Alliance.
// Teigha(R) for .dwg files Copyright (C) 2003-2011 by Open Design Alliance.
// All rights reserved.
//
// By use of this software, its documentation or related materials, you
// acknowledge and accept the above terms.
//
//
// *DWG is the native and proprietary file format for AutoCAD(R) and a trademark
// of Autodesk, Inc. Open Design Alliance is not associated with Autodesk.
///////////////////////////////////////////////////////////////////////////////
#include "OdaCommon.h"
#include "Ed/EdUserIO.h"
#include "Ed/EdCommandStack.h"
#include "DbCommandContext.h"
#include "DbSSet.h"
#include "DbDatabase.h"
#include "DbViewport.h"
#include "Ge/GeScale3d.h"
#include "Ge/GeExtents2d.h"
#include "DbBlockReference.h"
#include "DbPageController.h"
#define STL_USING_LIMITS
#define STL_USING_ALGORITHM
#define STL_USING_MAP
#include "OdaSTL.h"
#include "DbLayout.h"
#include "AbstractViewPE.h"
#include "DbSpatialFilter.h"
#include "DbIndex.h"
#include "Gi/GiClipBoundary.h"
#include "DbPolyline.h"
#include "DbBlockTableRecord.h"
#include "Ge/GeBoundBlock3d.h"
#include "Ge/GeKnotVector.h"
#include "DbUserIO.h"
#include "StaticRxObject.h"
#include "DbPolygonMesh.h"
#include "Db3dPolyline.h"
#include "DbVbaProject.h"
#include "DbHostAppServices.h"
#include "DbRotatedDimension.h"
#include "DbAlignedDimension.h"
#include "DbLoftedSurface.h"
#include "DbSortentsTable.h"
#include "DbTable.h"
#include "DbRevolveOptions.h"
#include "Ed/EdFunctionIO.h"
#include "FdField.h"
#include "DbRegAppTable.h"
#include "DbViewportTable.h"
#include "DbViewportTableRecord.h"
#include "DbSweepOptions.h"
#include "DbSubentId.h"
#include "DbPolyline.h"
#include "DbCompoundObjectId.h"
#include "DbAttribute.h"
#include "OdDToStr.h"
#include "ModelerMarkers.h"
class ClassFilter : public OdStaticRxObject<OdEdSSetTracker>
{
const OdRxClass* m_pClass;
public:
ClassFilter()
: m_pClass(OdRxObject::desc())
{
}
ClassFilter(const OdRxClass* pClass)
: m_pClass(pClass)
{
}
void setClass(const OdRxClass* pClass)
{
m_pClass = pClass;
}
int addDrawables(OdGsView* ) { return 0; }
void removeDrawables(OdGsView* ) { }
bool check(const OdDbObjectId& entId)
{
try
{
OdDbObjectPtr pObj = entId.safeOpenObject();
return pObj->isKindOf(m_pClass);
}
catch(const OdError& )
{
}
return false;
}
bool append(const OdDbObjectId& entId, const OdDbSelectionMethod* )
{
return check(entId);
}
bool remove(const OdDbObjectId& entId, const OdDbSelectionMethod* )
{
return check(entId);
}
};
void _thawlayers_func(OdEdCommandContext* pCmdCtx)
{
OdDbCommandContextPtr pDbCmdCtx(pCmdCtx);
OdDbDatabasePtr pDb = pDbCmdCtx->database();
OdDbUserIO* pIO = pDbCmdCtx->dbUserIO();
OdDbObjectIdArray layers;
OdRxClassPtr pClass = odrxClassDictionary()->getAt(OD_T("AcDbLayerTableRecord"));
ClassFilter fltr;
OdDbSelectionSetPtr pSSet = pIO->select("Select a layer <done>:", 0, 0, OdString(), &fltr);
OdDbSelectionSetIteratorPtr pIter = pSSet->newIterator();
while(!pIter->done())
{
layers.append(pIter->objectId());
pIter->next();
}
fltr.setClass(OdDbViewport::desc());
pSSet = pIO->select("Select a viewport:", 0, 0, OdString(), &fltr);
while(!pIter->done())
{
OdDbViewportPtr pVp = pIter->objectId().safeOpenObject();
pVp->thawLayersInViewport(layers);
pIter->next();
}
}
void _ForceErase_func(OdEdCommandContext* pCmdCtx)
{
OdDbCommandContextPtr pDbCmdCtx(pCmdCtx);
OdDbUserIO* pIO = pDbCmdCtx->dbUserIO();
OdDbSelectionSetPtr pSSet = pIO->select(OdString::kEmpty,
OdEd::kSelAllowInactSpaces|OdEd::kSelAllowObjects|OdEd::kSelAllowPSVP);
OdDbSelectionSetIteratorPtr pIter = pSSet->newIterator();
while(!pIter->done())
{
OdDbObjectPtr pObj = pIter->objectId().safeOpenObject(OdDb::kForWrite);
pObj->erase();
pIter->next();
}
}
OdEdCommandPtr pPrevErase;
void _ERASE_func(OdEdCommandContext* pCmdCtx)
{
OdDbCommandContextPtr pDbCmdCtx(pCmdCtx);
OdDbUserIO* pIO = pDbCmdCtx->dbUserIO();
OdString msg;
msg.format(OD_T("This custom DrxDebug:ERASE command overrides %s:ERASE one."), pPrevErase->groupName().c_str());
pIO->putString(msg);
odedRegCmds()->executeCommand(pPrevErase, pCmdCtx);
}
#if 0
//
// Tests unloading.
//
#include "DbBlockReference.h"
#include "DbPageController.h"
void extern_debugcommand(COdaMfcAppDoc* pDoc, CDwgView* pView)
{
OdDbDatabase* pDb = pDoc->database();
pDb->disableUndoRecording(false);
pDb->startUndoRecord();
OdDbEntityPtr pEnt;
OdDbBlockTableRecordPtr pMs = pDb->getModelSpaceId().safeOpenObject();
OdDbObjectIteratorPtr pIter = pMs->newIterator();
while (!pIter->done())
{
OdDbObjectId id = pIter->objectId();
pEnt = id.openObject();
if (pEnt->isA() == OdDbBlockReference::desc())
{
pEnt->upgradeOpen();
pEnt->setColorIndex(5);
}
pEnt = 0;
pIter->step();
}
odDbPageObjects(pDb);
}
#endif
#if 0
//
// Tests proxy flags.
//
#include "DbProxyEntity.h"
void extern_debugcommand(COdaMfcAppDoc* pDoc, CDwgView* pView)
{
OdDbObjectId objId = pView->getCurObjectId();
OdDbObjectPtr obj = objId.openObject(OdDb::kForWrite);
OdResult res;
OdString msg;
OdDbProxyEntityPtr pProxy = OdDbProxyEntity::cast(obj);
if (!pProxy.isNull())
{
res = pProxy->setColorIndex(5);
msg = "setColorIndex()\n";
msg += pDoc->appServices()->getErrorDescription(res);
pDoc->appServices()->warning(msg);
}
}
#endif
#if 1
//
// Tests replacing run-time classes used by DD by altering pseudo constructor.
// It needs to add next functions to test functionality:
// - rxInitExPseudo() to _My_Module::initApp()
// - rxUninitExPseudo() to _My_Module::uninitApp()
//
#include "DbClass.h"
#include "DbFiler.h"
#include "DbCircle.h"
#include "DbText.h"
#include "DbWipeout.h"
#include "DbProxyEntity.h"
class ExCustProxyEntity : public OdDbProxyEntity
{
OdString m_Name;
public:
ODDB_PSEUDO_DECLARE_MEMBERS(ExCustProxyEntity);
ExCustProxyEntity() : m_Name(OD_T("Custom proxy")) {}
virtual ~ExCustProxyEntity() {}
bool subWorldDraw(OdGiWorldDraw * pWd) const
{
OdDbProxyEntity::subWorldDraw(pWd);
OdDbTextPtr pText = OdDbText::createObject();
pText->setPropertiesFrom(this);
pText->setTextString(m_Name);
pText->worldDraw(pWd);
return true;
}
};
ODDB_PSEUDO_DEFINE_MEMBERS(ExCustProxyEntity,
OdDbProxyEntity,
OdDbProxyEntity,
DBOBJECT_CONSTR);
class ExCustBaseCircle : public OdDbCircle
{
public:
ODDB_DECLARE_MEMBERS(ExCustBaseCircle);
ExCustBaseCircle() : m_BaseName(OD_T("Custom circle")) {}
virtual ~ExCustBaseCircle() {}
protected:
OdString m_BaseName;
}
没有合适的资源?快使用搜索试试~ 我知道了~
TX_SDK_3.5
共1653个文件
h:1079个
cpp:242个
lib:188个
5星 · 超过95%的资源 需积分: 9 140 下载量 78 浏览量
2011-07-12
14:30:14
上传
评论
收藏 10.44MB ZIP 举报
温馨提示
无需Autocad直接操作Dwg图纸 支持Autocad各版本
资源推荐
资源详情
资源评论
收起资源包目录
TX_SDK_3.5 (1653个子文件)
TDVersion.h.bak 6KB
CMakeDetermineCompilerABI_CXX.bin 26KB
CMakeDetermineCompilerABI_C.bin 26KB
CMakeDetermineCompilerABI_CXX.bin 25KB
CMakeDetermineCompilerABI_C.bin 25KB
CMakeDetermineCompilerABI_CXX.bin 25KB
CMakeDetermineCompilerABI_C.bin 25KB
CMakeDetermineCompilerABI_CXX.bin 20KB
CMakeDetermineCompilerABI_C.bin 20KB
cmake.check_cache 86B
cmake.check_cache 86B
cmake.check_cache 86B
cmake.check_cache 86B
CMakeCXXCompiler.cmake 1KB
CMakeCXXCompiler.cmake 1KB
CMakeCXXCompiler.cmake 1KB
CMakeCXXCompiler.cmake 1KB
CMakeCCompiler.cmake 1KB
CMakeCCompiler.cmake 1KB
CMakeCCompiler.cmake 1KB
CMakeCCompiler.cmake 1KB
CMakeSystem.cmake 363B
CMakeSystem.cmake 363B
CMakeSystem.cmake 363B
CMakeSystem.cmake 363B
CMakeCPlatform.cmake 296B
CMakeCXXPlatform.cmake 296B
CMakeCPlatform.cmake 295B
CMakeCXXPlatform.cmake 295B
CMakeCPlatform.cmake 295B
CMakeCXXPlatform.cmake 295B
CMakeCPlatform.cmake 295B
CMakeCXXPlatform.cmake 295B
CMakeRCCompiler.cmake 261B
CMakeRCCompiler.cmake 261B
CMakeRCCompiler.cmake 261B
CMakeRCCompiler.cmake 261B
DrxDebugCmds.cpp 298KB
ExGiDirectXGeometry.cpp 146KB
GsOpenGLVectorizer.cpp 137KB
ExProtocolExtension.cpp 101KB
GsBitmapVectorizer.cpp 99KB
ExOpenGLMetafileStream.cpp 97KB
ExGiGDIGeometry.cpp 96KB
Dwf7ExportImpl.cpp 95KB
DbDumper.cpp 68KB
DbImpAssoc2dConstraintGroup.cpp 66KB
OdAlignedRecomputorEngine.cpp 63KB
ExGsDirectXDevice.cpp 60KB
OdAngularRecomputorEngine.cpp 60KB
Dwf2Dc.cpp 59KB
toString.cpp 57KB
OdDimRecomputor.cpp 57KB
GiWorldDrawDumper.cpp 52KB
3dDwfDrawObject.cpp 51KB
ExGiRasterImage.cpp 49KB
ExDbCommandContext.cpp 49KB
GsOpenGLStreamVectorizer.cpp 48KB
SvgExport.cpp 47KB
2dExportDevice.cpp 46KB
DbDimGripPoints.cpp 46KB
PlotSettingsValidatorPEImpl.cpp 43KB
PdfExportImpl.cpp 40KB
ExGsGDIVectorizeDevice.cpp 39KB
W2DImport.cpp 38KB
OdRadialRecomputorEngine.cpp 36KB
OdCurveFunctions.cpp 35KB
3dDWFimport.cpp 33KB
SmileyDbTransform.cpp 30KB
PdfAux.cpp 29KB
DwfDrawObject.cpp 29KB
Dwf7ImportImpl.cpp 28KB
PdfTTFontData.cpp 28KB
DbMleaderGripPoints.cpp 28KB
OdAlignedDimRecomputor.cpp 27KB
ImportCallbacks.cpp 27KB
OdFileBuf.cpp 26KB
Pdf2Dc.cpp 25KB
Od2LineAngularDimRecomputor.cpp 22KB
PDF2dExportView.cpp 22KB
Od3PointAngularDimRecomputor.cpp 22KB
OdRadialDimLargeRecomputor.cpp 21KB
OdConstrainedGeometry.cpp 20KB
AsSurfBody.cpp 20KB
GripPoints.cpp 19KB
OdRadialDimRecomputor.cpp 18KB
ExCustEntity.cpp 18KB
OdArcDimRecomputor.cpp 18KB
ExGsOpenGLVectorizeDevice.cpp 18KB
AsSubSurfaces.cpp 18KB
PDF2dExportDevice.cpp 17KB
ThreadPoolModule.cpp 17KB
OdConstrainedBoundedLineImpl.cpp 17KB
DbAssocDimDependencyBodyBase.cpp 17KB
ExFieldEvaluator.cpp 17KB
ExCustObject.cpp 16KB
DbImpAssocGeomDependency.cpp 16KB
OdConstrainedSplineImpl.cpp 15KB
ExDcCreateCommands.cpp 15KB
DbEvalVariant.cpp 15KB
共 1653 条
- 1
- 2
- 3
- 4
- 5
- 6
- 17
sipmzy
- 粉丝: 1
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- IMG_20240425_120538.jpg
- My Complete Genome_6k Base-Pairs of Phenotype SNPs_Complete Raw Data.zip
- qt 的mqtt测试demo
- 移动应用开发教程-zip.zip
- mosquitto-2.018-install-windows-x64
- FTPServer FTP 服务器,绿色免安装,单文件
- 梦畅语音点名软件,上课点名
- 利用ADNI数据集和标签,在tensorflow框架上使用tensorlayer接口,通过架构u-net实现海马体的分割
- Kutools for Word v9.0 office word 插件
- 修复Windows 10 LTSC 2021资源占用率高
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
- 4
- 5
前往页