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

triming a nurbs surface
triming a nurbs surface
i can read the dwg joined here but :
in odamfcapp a quarter of torus appears
in my app the complete torus appears.
does it means i'm loosing some info
i've tried to understand getenveloppe() method but i don't know what i can do with lowbound and upperbound they are not lying in (uxv) space [0,1] x [0,1]
is it possible to have the full code of odamfcapp to see how these data are hold ? it will be nice to be able to track the reading code when having such a difficulty with a special entity.
philippe
attached images
hi,
as i see from picture, you draw full torus. but solid surface consist of full torus and trimming curves. it is not trivial task to cut piece of surface by trimming curves(loops). mfcapp used modelergeometry.drx library for it. it is possible to get geometry from oddbsolid object. it can return geometry like isolines or like shells (triangles). if you use opengl for viewing, you should push surface trimming loops to opengl.
the sources are available only for founding members.
trimming loop ?
thanks for this answer but could you tell me more about triming loops ?
i've made a search in oda help files. i did'nt find anything except odbrfacelooptraverser. but i don't know how to use it ...
what i did to explore an odbrbrep
1) use odbrbrepfacetraverser get a serie of odbrface
2) for each odbrface use getenveloppe to get a nurbs
3) trim it ... but i don't know how ? i have an access to a trimming api for nurbs in my kernel modeler. so i think i should be able to use trimming data if i can get them. are these trimming data hidden ?
philippe
brepfacetraverser - get enum of faces.
facelooptraverser - get enum of trimming loop for face
loopedgetraverser - get edges of loop
loopedgetraverser has getorientedcurve method (return pointer to newly created odgecurve3d object)
edge has getvertex1, getvertex2 (return start\end vertexes of edge)
also face, edge, loopedgetraverser has orientation flag = forward\reverse.
you can read arx help about br. ddt br and arx br are very similar.
oddbsolid and mesh
when you say :
"it is possible to get geometry from oddbsolid object. it can return geometry like isolines or like shells (triangles). if you use opengl for viewing, you should push surface trimming loops to opengl."
could you explain me more how to retrieve isolines or shells (triangles) ?
i've spent many hours to retrieve data from odbrface with poor result ...
i can't find a way to read complex data even with oda library. the mfc sample read them very well, i don't ... perhaps it's too complex for me.
i need at least just to visualize these models and i don't need the brep models to be recreated...
any help will be very appreciated.
philippe
attached files (39.4 kb, 9 views)

1. see satgeomtracer example. it return isolines and shells from *.sat file . you have similar task with oddb3dsolid object.
i think that you could call
od3dsolidptr psolid = ...
odsampleworldgeometry wirewd;
psolid->worlddraw(wirewd);
regentype() should return odacisrenderer::kshells for shells odacisrenderer::kisolines for isolines. also numberofisolines sholud return number of isolines
2. also we have brex sample. it show you how to use br* classes.
3. you can convert od3dsolid to oddbpolyfacemesh like in oneditacisconversion() (mfcapp sample) and get triangles from oddbpolyfacemesh.
od3dsolid -> oddbpolyfacemesh
dear alexander,
thank you for your answer but i've tried to explore all the way and i'me sure that i missed something :
1) where can i find satgeomtracer example ? i've tried to localize it without any success ?
2) brex sample. are too complicated for me. i've tried to look at them but there is no example that read a complex shape and explore trimmed nurbs. it usually loop face and edge... to display their coordinates.
3) the example i have found with oneditacisconversion() does not mention od3dsolid or oddbpolyfacemesh. it just seems to save an object in another format and this process is transparent while writing directly in database
this solution od3dsolid -> oddbpolyfacemesh would be a good solution to start with but i failed on that way too.
is there anything i did not installed ?
philippe
quote:
originally posted by philippe carret
dear alexander,
1) where can i find satgeomtracer example ? i've tried to localize it without any success ?
nonlibs.zip examples/satgeomtracer
quote:
3) the example i have found with oneditacisconversion() does not mention od3dsolid or oddbpolyfacemesh. it just seems to save an object in another format and this process is transparent while writing directly in database
philippe
code below from odamfcapp sample replaces all acis entities in model space with oddbpolyfacemeshes.
code:
void cdwgview:neditacisconversion()
{
oddbdatabase* pdb = getdocument();
pdb->startundorecord();
oddbblocktablerecordptr pms = pdb->getmodelspaceid().openobject();
oddbobjectiteratorptr pentiter = pms->newiterator();
while(!pentiter->done())
{
oddbentityptr pent = pentiter->entity(oddb::kforwrite);
pentiter->step();
if (!pent.isnull()
&& (pent->iskindof(oddbregion::desc())
|| pent->iskindof(oddbbody::desc())
|| pent->iskindof(oddb3dsolid::desc())))
{
bool exchangexdata;
oddbobjectid replaceid;
oddbobjectptr pnewobj = pent->decomposeforsave(oddb::vac12, replaceid, exchangexdata);
if (!pnewobj.isnull())
{
pent->handoverto(pnewobj);
}
}
}
filltree();
}
sergey slezkin
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
回复


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】profile of surface vs profile of line yang686526 American standards 0 2009-04-29 09:29 PM
【转帖】profile of a surface on a honeycomb composite core yang686526 American standards 0 2009-04-29 09:27 PM
【转帖】asme - where to star yang686526 American standards 0 2009-04-29 07:28 PM
【转帖】blending a sculpted surface yang686526 SolidWorks二次开发 0 2009-04-13 09:17 AM
曲面造型技术 huangyhg CAD内核 0 2006-11-05 02:59 PM


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


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