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

newbie question about 3d objects and rendering
newbie question about 3d objects and rendering
i am working on a new project involving rendering 3d objects. initially, i did not think about using dwgdirect for doing this, but after brief investigation it seems to have all the features i need. but, i need to confirm whether dwgdirect will be able to do what i need. basically, this is what i'm trying to accomplish. i have data in another application for a 3d model. each model contains an array of surfaces, where each surface is a an array of points. each surface also contains rendering properties such as color. additionally, each surface can contain child surfaces and holes. i would like to feed this data into middleware that i am building using dwgdirect solely for rendering purposes, so that it can display a 3d model that properly shows the surfaces in relation to each other. i don't need to persist anything or allow the user to edit entities while viewing... just displaying, zooming, and rotating using a dolly of sorts. is this something that dwgdirect can do easily? if so, is there an example of how 3d models can be rendered using dwgdirect by importing from a third-party drawing format? i noticed that odamfcapp has an example of reading a 3d dwg drawing and rendering it. but, i know too little about how 3d drawings are structured in dwg files to know how to convert my data to dwg. i would appreciate any help you can provide. thanks.
dwgdirect is mostly intended to work with dwg drawings (read/write/create/edit/view). if your data is in some other format you would need to import it into dwgdirect first (convert to dwg).
depending on format/organization of your 3d data it may be more practical to render it using directx or opengl without dwgdirect.
btw, acis data (sat or sab) can be easily imported into dwgdirect.
sergey slezkin
ok... i've been able to "convert" the data from my third-party application to dwg format by basically creating lines and 3d polylines. so, it draws the edges beautifully using the proper colors. happy so far.
but, when i try to view it with surface shading (e.g. - gourad shading) in the sample mfc application, it doesn't do it properly... it only shows the edges. the "surface" is transparent. why is that? when i create line and 3d polyline objects, do i need to tell it anything more than the points (or vertices) and the color in order to make it render the surface properly?
or, is my only option to use acis? if so, how do i create a acis data (sat or sab)? dwgdirect doesn't seem to have any apis for creating acis data from scratch. can you direct me? thanks.
lines and polylines can't represent a surface. surfaces can be represented by oddbpolygonmesh, oddbpolyfacemesh or acis objects (oddb3dsolid, oddbbody).
oddb3dsolid has a number of methods for creating simple objects (createbox(), createsphere(), ...)
sergey slezkin
you can use a triangulator (for example opengl's triangulator) to convert 3d polylines into 3dface.
do you want obtain a vector or a raster render?
thanks rareba for your suggestion about triangulation. essentially, that's what seems to be missing from dwgdirect for what i'm trying to accomplish. i understand that dwgdirect supports 3dface, but as you mentioned, i need to convert my polyline points into triangles for surface rendering by the 3dface object. ultimately, i'm not to concerned about the rendering engine whether it's directx, gdi, or opengl... whichever performs best. is that what you were asking about rendering raster or vector?
because they are two approach very different. i use opengl triangulator and it is very stable and esy to use. with triangulator you obtain a set of triangles and you can render like you want.
last edited by rareba; 24th january 2007 at 09:28 amfff">.
closed polylines can be used to construct a region (oddbregion).
but the need to be planar.
sergey slezkin
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
 


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】modifiednew objects not updated properly [2.7.1] yang686526 DirectDWG 0 2009-05-06 06:01 PM
【转帖】incomplete rendering to bitmap yang686526 DirectDWG 0 2009-05-06 03:47 PM
【转帖】how to increase rendering speed yang686526 DirectDWG 0 2009-05-06 02:53 PM
【转帖】help11 3d block rendering colour yang686526 DirectDWG 0 2009-05-05 12:07 PM
【转帖】acis question yang686526 DirectDWG 0 2009-05-04 03:38 PM


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


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