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

exploring brep
exploring brep
hi all
i am involved in a project where i have to display the geometric contents of a dwg file using opengl. i extracted some entities using your opendesign library. when using 3dsolid data i first converted the data to polyfacemesh. applying this way, we get a huge number of polyfacemesh data and the application becomes slower.
so i tried another approach-the brep one. i am new to using brep. i used the following approach.
1. get the brep of the solid.
2. travers the face record.
3. get the relevant surface entity.
here i am getting the sphere, cylinder, cone as i expected.
but when i draw a box in autocad file and read it i get some planes. now question is how to draw the same box here with the help of these planes.
also how to draw a individual plane entity that we get form face.
is it the correct approach to draw a solid entity.
kindly help me in this respect.
with regards.
anirban talukdar
hi,
dd has some examples about brep - odbrex, satbrepsample, satconverter, satgeomtracer. odbrex may help with brep traversing functionality.
box consist of 6 planes. each plane trimmed with 4 edges. each edges limited with 2 vertexes - start\end.
odbrface::getsurface() return odgeplane object for single box plane. it is unlimited plane. odbrfacelooptraverser and odbrloopedgetraverser return to you non\one\more trimming loops. this is only one trimming loop for single box plane. it is 4 edged square.
if you didn't use polyfacemesh convertion, you can draw solids like enum of isolines (like in satgeomtracer).
the simples way to draw something is draw all edges from brep, but full sphere hasn't trimming edges - so you got nothing.
also you can decrease number of triangles by changing of triangulation params (mfcapp\tools\options\triangulationparams). for example if you add next code to cdwgview:neditacisconversion, it change normaltolerance to 45.
odrxgetmodelergeometrycreatorservice(); // for command registration
getdocument()->executecommand("modelerproperties normaltolerance 45 finish");
relationship between plane/edge edge/vertex
yes sir..
i got the point. but after getting the plane how to get the relationship which edge is connected to which plane and which vertices are coonected to which edges..
that is the problem i am exactly facing. also write me about loop in brep.
with regards
anirban
well, odbr classes are very similar to arx acbr*. autocad has full documentation about.
about relationship... for example edge <> vertexes...
odbredge loop;
....
odbrloopedgetraverser letr;
letr.setloop( loop )
while( ! letr.done() )
{
odbredge edge;
edge = letr.getedge();
.....
odbrvertex vertex1, vertex2;
edge.getvertex1( vertex1 );
edge.getvertex2( vertex2 );
.....
letr.next();
}
it was connection from loop->edge->vertexes
next point is odbrvertexedgetraverser... it return enum of edges connected to vertex. single vertex in box connect with 3 edges. it was vertexes->edge and you shoud use
odbredgelooptraverser to got edge->loops connection.
travesing problem.
sir
there are so many ways you can travers a brep. each traverser may have different purpose. we can use any one of the traverser to perform the task.
here i have to display the breps(i mean solids). so sir what will be the best way to travers it.
if you use the no of traversers you can have the following lists..
1. odbrbrepcomplextraverser
2. odbrbrepedgetraverser
3. odbrbrepfacetraverser
4. odbrbrepshelltraverser
5. odbrbrepvertextraverser
6. odbrcomplexshelltraverser
7. odbredgelooptraverser
8. odbrfacelooptraverser
9. odbrloopedgetraverser
10. odbrloopvertextraverser
11. odbrshellfacetraverser
12. odbrvertexedgetraverser
13. odbrvertexlooptraverser
we can use odbrfacelooptraverser traverser from which we can have a collection of faces, from which we can have a surface. by getting the surfacetype we can get the information of the surface. a surface may be any one of the following..
1. odgetorus,
2. odgeexternalboundedsurface,
3. odgeellipcylinder,
4.odgeplanarent,
5. odgecone,
6. odgecylinder,
7. odgeexternalsurface,
8. odgeellipcone,
9. odgeoffsetsurface,
10. odgenurbsurface, and
11. odgesphere
and if we are able to draw these surfaces...is it will be suffice to draw the brep. sir kindly let me know whether i am correct or not.
if not kindly write me a good approach..
kindly write to me..
with regards..
anirban talukdar
last edited by atalukdar; 23rd february 2006 at 04:04 amfff">.
i think, that using of odbrbrepfacetraverser, odbrfacelooptraverser, odbrloopedgetraverser will be optimal for brep drawing.
odbr classes return next odge surfaces :
1. odgetorus,
3. odgeellipcylinder,
5. odgecone,
6. odgecylinder,
8. odgeellipcone,
10. odgenurbsurface, and
11. odgesphere
** odgeplane
also odbr has getsurfaceasnurb method, it convert ge* surface to odgenurbsurface. it can be useful for opengl.
// and if we are able to draw these surfaces...is it will be suffice to draw the brep.
the situation - you need to draw cylinder. generally, it has two trimming loops - upper\lower circles. odgecylinder is just tube with center, radius, normal. it is unlimited in both directions. so it is not enough to draw only cylinder - you should trim it by upper\lower circles.
thanks
thank you sir, it seems i got the solution of the problem.
thank you again.
anirban
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
 


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

高级搜索
显示模式

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

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

相似的主题
主题 主题发起者 论坛 回复 最后发表
【转帖】brep traversal yang686526 DirectDWG 0 2009-05-04 05:01 PM
【转帖】brep to solid conversion yang686526 DirectDWG 0 2009-05-04 05:01 PM
【转帖】brep edge loop curves intersectoverlap yang686526 DirectDWG 0 2009-05-04 05:00 PM
【转帖】acis sat data yang686526 DirectDWG 0 2009-05-04 03:39 PM
【转帖】3d solid reading as disconnected solids yang686526 DirectDWG 0 2009-05-04 03:03 PM


所有的时间均为北京时间。 现在的时间是 04:35 PM.


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