几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量  


返回   几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 » 仿射空间:CAX软件开发(三)二次开发与程序设计 » CAD二次开发 » AutoCAD二次开发 » DirectDWG
用户名
密码
注册 帮助 会员 日历 银行 搜索 今日新帖 标记论坛为已读


回复
 
主题工具 搜索本主题 显示模式
旧 2009-05-04, 03:52 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】adtdirect wall geometry

adtdirect wall geometry
adtdirect wall geometry
hello,
i’m using adtdirect and i want to get the 3d geometry for wall aecdbwall with elinear wall type. i can get length, width, height, 3d start and end points. but this is not enough to determinate all geometry in space.
how can i get it? may i get a 3d vector which determinates a direction in space or some other location properties?
thanks in advance.
hello, dynamo
all adt entities including aecdbwall have the transformation matrix.
it can be obtained by getmatrix method (aecdbgeo member).
for linear wall - x axis of this matrix defines the direction from start to end.
but this transformation, length, depth and height do not fully describe the geometry of the wall. it can store a lot of other modifiers and properties and actually may consist of multiple parallel components.
for example, i attached the file with a wall that has two components.
regards,
vladimir alekseev
attached files (445.5 kb, 14 views)

hello,
how can i get the position of a wall with ebaseline justification?
may i get edge offset or something else like that?
thanks in advance.
quote:
originally posted by dynamo
hello,
how can i get the position of a wall with ebaseline justification?
may i get edge offset or something else like that?
thanks in advance.
hello,
i will explain it here for linear wall case.
// wall transform.
odgematrix3d mmatrix = pwall->getmatrix();
// the length of the linear wall is measured along this x axis:
odgevector3d vxaxis = pwall->getcsxaxis();
// the offset for start and end of component's width is measured along y axis.
odgevector3d vyaxis = pwall->getcsyaxis();
// we will need base wall width:
double dbasewidth = pwall->getwidth();
for each wall component (obtained form wall style):
aecwallstylecompptr pwallcomp = pwallstyle->getcomponentcount( index );
aecwallstylecompposptr pwallcompposition = pwallcomp->getposition();
double dcompwidth = pwallcompposition->getwidth()->getvalue( dbasewidth );
double dcompoffset = pwallcompposition->getwidth()->getedgeoffset( dbasewidth );
y axis +
dcompwidth+dcompoffset--end of component width---|
| |
0--------------------------baseline-----------------length---x axis +
| |
dcompoffset---------------start of component width--|
y axis -
in case of other type of justification the behaviour is different:
if dmin is the minimum point for all component along y axis
and dmax is the maximum point then the dimension of resulting wall along its y axis is
[ 0, dmax - dmin] - for eright case.
[ dmin - dmax, 0] - for eleft case.
[ (dmin - dmax) / 2, (dmax - dmin) / 2] - for ecetner case.
and for the ebaseline case (see picture) it is [ dmin, dmax ].
since next version, which will be available after dd1.13
wall style will have this method:
odgeinterval getrealwidth( double dbasewidth ) const.
it allows to obtain [dmin, dmax] interval.
here is its implementation:
double dmin = 1e10, dmax = -1e10;
if( 0 < getcomponentcount() )
{
oduint32 i, isize = getcomponentcount();
for( i = 0; i < isize; i++ )
{
aecwallstylecompptr pcomponent = getcomponentbyindex( i );
aecwallstylecompposptr pcomponentpos = pcomponent->getposition();
double dvalue1 = pcomponentpos->getedgeoffset()->getvalue( dbasewidth );
double dvalue2 = dvalue1 + pcomponentpos->getwidth()->getvalue( dbasewidth );
if ( dvalue1 > dmax ) dmax = dvalue1;
if ( dvalue1 < dmin ) dmin = dvalue1;
if ( dvalue2 > dmax ) dmax = dvalue2;
if ( dvalue2 < dmin ) dmin = dvalue2;
}
}
return odgeinterval( dmin, dmax );
regards,
vladimir alekseev
last edited by vladimir alekseev; 24th february 2005 at 12:51 amfff">.
thank you, for such a detail explanation. this really helped.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


主题工具 搜索本主题
搜索本主题:

高级搜索
显示模式

发帖规则
不可以发表新主题
不可以回复主题
不可以上传附件
不可以编辑您的帖子

vB 代码开启
[IMG]代码开启
HTML代码关闭

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】adtdirect wall geometry question yang686526 DirectDWG 0 2009-05-04 03:51 PM
【转帖】boundary detection and geometry operation yang686526 ObjectARX(VB.NET/C#) 0 2009-04-29 04:46 PM
【转帖】boundary detection and geometry operation yang686526 ObjectARX(C++) 0 2009-04-16 09:23 AM
【转帖】define self intersecting geometry yang686526 SolidWorks二次开发 0 2009-04-13 10:13 AM


所有的时间均为北京时间。 现在的时间是 12:54 AM.


于2004年创办,几何尺寸与公差论坛"致力于产品几何量公差标准GD&T | GPS研究/CAD设计/CAM加工/CMM测量"。免责声明:论坛严禁发布色情反动言论及有关违反国家法律法规内容!情节严重者提供其IP,并配合相关部门进行严厉查处,若內容有涉及侵权,请立即联系我们QQ:44671734。注:此论坛须管理员验证方可发帖。
沪ICP备06057009号-2
更多