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

odgecone::getheight()
odgecone::getheight()
hi,
can somebody explain what the interval returned by odgecone::getheight() means?
what does it represent geometrically?
thanks,
lowell
odgecone::basecenter()
the point returned is half way up the cone, on the axis. is that the way its supposed to be?
thanks,
lowell
base of the cone do not trim the surface. cone surface may extend from the base in both directions. getheight returns the interval of surface along the simetric axis. zero heigt correspond to the base of the cone. it increases along the axis of symmetry.
sergey slezkin
odgecone::basecenter()
ok, i think i understand your explaination, but it doesn't match with the results i see from the interface. or maybe i didn't understand you - is there any written documentation on odgecone anywhere?
if i did understand,. it appears that the values returned may not be corrent.
if i make a cone in autocad:
base at 0,0,0 radius 1.0, height 2.0 axis 0,0,1:
odgecone::basecenter() returns 0,0,1
odgecone::apex() returns 0,0,2
odgecone::getheight( range),
range.getbounds( h0, h1)
h0 == 0.0, h1 == 2.2360679774998
the value of range.m_upperparam ( 2360679774998) is the distance from the apex to a point on the base of the cone, not parallel to the axis.
thanks,
lowell
v = 0 correspond to the base of the cone. v is dimensionless and increases in the direction the axis of symmetry. it is scaled against the initial base radius of the cone.
h (2.24) = 2 / sin( angle )
last edited by sslezkin; 3rd december 2003 at 08:07 amfff">.
odgecone::getheight()
this is not at all clear to me. i need a more explicit answer.
what i am trying to do is to convert to a cone form that uses the following information:
point at the tip of the cone
axis direction
point at the center of the circle that trims the cone at the big end
radius of the circle that trims the cone at the big end.
if the cone is truncated,
point at the center of the circle that trims the cone at the small end
radius of the circle that trims the cone at the small end.
what information do i use from odgecone, and how so i use it to get what i need?
lowell
our realization of odgecone is different from arx. this is bug, and i will fix it in next release.
in current toolkit version :
height is equal to u parameter of autocad, i.e. it is scaled distance from point on lower circle to point on cone surface. for example if you need height(0, 2) call setheight(u1 ,u2) after calculations
u = h / baseradius / cosineangle
btw : getenvelope and getheight return requal intervals. they will different in next release.
thank you for answering, but i would still like to know the answer to the question in my last post:
what information do i use from odgecone, and how so i use it to get what i need?
it would be great if there were some written documentation on this. i am really not clear at all about getheight() and now that you mention getenvelope(), i don't understand it either.
is there written documentation?
how do i convert to tip & bottom circle representation of a cone?
thanks,
lowell
documentations : try download arx documentation from
also read description section in odgecone.h
about your problem :
double a = 30.; // cones angle
double sina = -sin(a / 180. * 3.14159); // sin
double cosa = cos(a / 180. * 3.14159); // cos
odgecone cone; // sample cone
cone.set(cosa, sina, odgepoint3d(), 1, odgevector3d(0,0,1));
odgepoint3d ap = cone.apex();
double apexu = cone.paramof( ap ).x;
double pnt1u = apexu * 0.7;
double pnt2u = apexu * 0.3;
// you can use cone.paramof().x for calculation u parameter of
// point from top/bottom circle.
// double pnt1u = cone.paramof( toppnt ).x;
// double pnt2u = cone.paramof( bottompnt ).x;
// uncomment lines in next release
// pnt1u = cone.heightat( pnt1u );
// pnt2u = cone.heightat( pnt2u );
cone.setheight(odgeinterval(pnt1u, pnt2u));
so if you have only two circles from top and bottom of cutted cone:
1. set base point and base radius to center and radius from bottom circle
2. set cone axis to (top circle center - bottom circle center)
3. calculate cosa, sina somehow
4. call cone.set( ..... ) with data from 1,2,3
5. get any point from top circle ( toppnt )
6. get pnt1u by cone.paramof( toppnt ).x
7. get any point from bottom circle ( bottompnt )
8. get pnt2u by cone.paramof( bottompnt ).x
9. call cone.setheight(odgeinterval(pnt1u, pnt2u));
the example you posted is for making a cone in the od toolkit. what i asked for is information on reading a cone from the od toolkit and converting it to a form i can use.
given the information i can get from od:
apex
base
heights
axis
etc.
how do i find the centers of the circle(s) that trim the cone?
i understand about propogating the half angle along the axis starting at the apex to get the radii.
what i do not understand is how to find the distance along the axis, starting at the apex, to the center(s) of the trimming circle(s)
ok, i understand what you want.
one question before... have you cutted cones of any form (a)
or (b)
1. trimming loops are always circles.
2. normal of trimming circles is parallel to axis of cone.
?
in (b) case you need one point from triming circle and ...
odgepoint3d p3d = .... ; // any point from circle
odgevector3d axis = cone.axisofsymmetry();
// center is center of trimming circle
odgepoint3d center = axis.evalpoint( axis.paramof( p3d ) );
i think there is still some misunderstanding.
i am using od toolkit to read a .dwg file that may have a cone surfaces in it.
i don't know anything about the cone except what comes to me from the dwg file via od toolkit.
i want to represent the cone in a way i can use - apex, axis and trimming circle, or two trimming circles if there are 2 trimming circles represented in the dwg file.
i can't tell where the trimming circles are.
thanks,
lowell
//i am using od toolkit to read a .dwg file that may have a
// cone surfaces in it.
do you use odbr classes for getting surfaces?
what is your task in general?
//i don't know anything about the cone except what
//comes to me from the dwg file via od toolkit.
it seems that you use only odbrface.getsurface() method. it is not enough for description of cone object.
//i want to represent the cone in a way i can use - apex,
//axis and trimming circle, or two trimming circles if there are
//2 trimming circles represented in the dwg file.
look at the attached cone.bmp. as you can see cone can have more that 2 trimming circles, it is possible that cone havn't circles, and it can have trimming loops of 'any' form. so you need information about trimming loops also. or do you solve special case (b)? if yes, see my previous answer. if no, read documentation about odbrfacelooptraverser and about all odbr classes.
attached images (66.6 kb, 12 views)
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)
 


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

高级搜索
显示模式

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

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



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


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