几何尺寸与公差论坛------致力于产品几何量公差标准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-07, 03:48 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】settriangulationparams Problem

settriangulationparams problem
settriangulationparams problem
hi,
i am trying to set the normaltolerance of the triangulationparams.
i have browsed the odamfcapp, which does this using a command window.
however, debugging does not reveal the actual method of setting this parameter. by tracing the assembler code the command
odmodelergeometryimpl::settriangulationsparameters
seems to be used (source code is missing).
could you provide me a code snippet to run settriangulationsparameters
and gettriangulationsparameters directly without using the command interface, in codamfcappdoc:noptionstriangulationparams
best regards,
dag barosen
set\get triangulation params realized via command only. you could use next form of executecommand to set normaltolerance to 10.
executecommand("modelerproperties normaltolerance 10 finish");
c++ api to acis tessellation parameters?
hello alex
the last time i checked up on this issue i was told that access to the "include\wr\wrtriangulationparams.h" acis tessellation parameters would be given a c++ interface in a near future version of dwgdirect. looking at the code i'm not sure if this has come about. my desire is to modify the acis tessellation parameters used when converting a acis embedded dwg model over to dxf. could you provide an example snippet of code to show the current method to set all /supported/ acis tessellation parameters? i recall in 2004 or 2005 you had mentioned to me that not all of them are currently used. thanks.
code:
#include "wr\\wrtriangulationparams.h"
#include "modelergeometry\\modelermodule.h"
toolkit_export odrxclassptr odrxgetmodelergeometrycreatorservice();
void codamfcappdoc:noptionstriangulationparams()
{
odrxclassptr pservice = odrxservicedictionary()->getat(dd_t("odmodelergeometrycreator"));
if (pservice.isnull())
{
odrxmoduleptr pmodule = odrxdynamiclinker()->loadapp(dd_t("modelergeometry"));
odsmartptr<modelermodule> pmodmodule = modelermodule::cast(pmodule);
if (pmodmodule.get())
{
wrtriangulationparams triangulationparams;
pmodmodule->gettriangulationparams(triangulationparams);
triangulationparams.normaltolerance = 1;
pmodmodule->settriangulationparams(triangulationparams);
}
}
wrtriangulationparams params;
params.normaltolerance = 1.0;
modelermodule::settriangulationparams(params);
hi alex
thanks for the very prompt reply. i just need to confirm one other thing. a while ago you provided me this info. can you confirm that these are still the list of supported and non-supported tessellation paramerters? i'd think that "surfacetolerance" would be your core surface deviation control method -- how is that controlled by most end users other than the normal deviation and nurbs grid lines?
---------
double maxfacetedgelength;
by default = 0. i.e. disabled.
double normaltolerance;
by default = 15. i.e. sphere, cone, torus, cylinder breaks with angle step <= 15.
oduint32 pointsperedge;
for situation like circle hole at plane. circle approximate by pointsperedge point polyline. ' 0.' is default, getsamplepoints with ' 0. ' approxeps used in this case.
oduint16 betweenknots;
for nurbs tesselation only. if betweenknots = 0, nurbs grid lines lies on the knots value in uv plane. if betweenknots = 1, additional line added between knot values....
aren't supported :
oduint32 maxnumgridlines;
double surfacetolerance;
double gridaspectratio;
maxfacetedgelength
hello alex
for the "maxfacetedgelength" parameter, what does it define and what are its limits?
in spatial acis this parameter ranges from 0.0 to 1.0.
while experimenting with dwgdirect, any value greater than 0 and less than 1.0 would cause no data (of a acis solid sphere) to be imported. setting it to 1.0 forced the length of the longest edge of a triangle to be no greater than 1.0 worldspace units. setting it greater than 1.0 had no further effect over the 1.0 value. hence, i am slightly confused about its usage and parameter limits.
and to mirror my other question elsewhere, are the other "unused" parameters now used anywhere in the current dwgdirect implementation, and if so, what are their (1) definitions, (2) what do they affect and (3) what are their upper/lower parameter bounds?
thanks.
hi,
only few parameters are used - these are
normaltolerance - controll tesselation of cylinders\spheres\cones
betweenknots - for nurb surfaces
pointsperedge - used in rare cases when edge cannot be represented properly.
busefacetres - use facetres system variable. it just tried to recalculate dnormaltol = f (facetres) to 'something like autocad'.
all other parameters are unused.
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】problem reading r12 dxf files yang686526 DirectDWG 0 2009-05-06 10:56 PM
【转帖】problem in opening file with 2.1.0 yang686526 DirectDWG 0 2009-05-06 10:47 PM
【转帖】problem finding fonts yang686526 DirectDWG 0 2009-05-06 10:43 PM
【转帖】oda 1.06 vs new 1.08 and 1.09 nls problem yang686526 DirectDWG 0 2009-05-06 06:50 PM
【转帖】cannot open a dwg file in autocad - random problem yang686526 DirectDWG 0 2009-05-04 05:28 PM


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


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