找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

查看: 491|回复: 1

[ARX函数]:请问晓东插入函数insert的问题!

[复制链接]
发表于 2004-4-16 03:58:54 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
请问晓东插入函数insert中的AcGeMatrix3d& xform参数要怎样初始化为X,Y比例不同呢?我试过用AcGeMatrix3d Mat; Mat(0,0)=1,Mat(1,1)=2,Mat(2,2)=1;可是好像没作用,请帮一下忙!
Acad::ErrorStatus

insert(

const AcGeMatrix3d& xform,

AcDbDatabase* pDb,

bool preserveSourceDatabase = true);

xform Input transformation matrix applied to all objects being inserted
pDb Input pointer to database to insert from
preserveSourceDatabase Input to determine whether the source database pDb will be left intact
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!

已领礼包: 145个

财富等级: 日进斗金

发表于 2004-4-16 04:11:17 | 显示全部楼层

Re: [ARX函数]:请问晓东插入函数insert的问题!

最初由 chsqchne 发布
[B]请问晓东插入函数insert中的AcGeMatrix3d& xform参数要怎样初始化为X,Y比例不同呢?我试过用AcGeMatrix3d Mat; Mat(0,0)=1,Mat(1,1)=2,Mat(2,2)=1;可是好像没作用,请帮一下忙!
Acad::ErrorStatus

insert(

c... [/B]


还是一个概念的问题,XYZ不同比例只对INSERT实体起作用,就说明是对 AcDbBlockReference 对象,所以你要到 AcDbBlockReference 的编辑方法里面去找,你说的INSERT是插入外部数据库,是等比例的插入(或者不插入,你自己在当前数据库根据数据生成BLOCK定义),因为插入后的对象是AcDbBLockTableRecord(BLOCK),因此只能是X,Y,Z是单位比例的,从这个BLOCK可以生成能在数据库可视的INSERT,生成的过程中可以设置XYZ不同的比例。你看看下面的方法:

[field]
AcDbBlockReference::setScaleFactors Function virtual Acad::ErrorStatus

setScaleFactors(

const AcGeScale3d& scale);

scale Input an AcGeScale3d object containing the X, Y, and Z scale

factors to be used by the block reference

This function sets the block reference to use the X, Y, and Z scale
factors contained in scale.

The X, Y, and Z scaling of the block reference is applied to the entities in
the referenced block table record relative to their perceived WCS
coordinate axes, which may or may not be the same as the drawing抯
WCS axes.

The X scale factor value is used for DXF group code 41.

The Y scale factor value is used for DXF group code 42.

The Z scale factor value is used for DXF group code 43.

Returns Acad::eOk if successful, or Acad::eInvalidInput if the data
passed in is not acceptable. eInvalidInput will also be returned if any of
the specified scale factors is 0.0.
[/field]
论坛插件加载方法
发帖求助前要善用【论坛搜索】功能,那里可能会有你要找的答案;
如果你在论坛求助问题,并且已经从坛友或者管理的回复中解决了问题,请把帖子标题加上【已解决】;
如何回报帮助你解决问题的坛友,一个好办法就是给对方加【D豆】,加分不会扣除自己的积分,做一个热心并受欢迎的人!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|申请友链|Archiver|手机版|小黑屋|辽公网安备|晓东CAD家园 ( 辽ICP备15016793号 )

GMT+8, 2024-9-21 15:34 , Processed in 0.188286 second(s), 34 queries , Gzip On.

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表