几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】how to convert point from wcs to ocs (http://www.dimcax.com/hust/showthread.php?t=16626)

yang686526 2009-05-06 02:23 PM

【转帖】how to convert point from wcs to ocs
 
how to convert point from wcs to ocs?
how to convert point from wcs to ocs?
hello,
i have one question.
how can i convert point from wcs to ocs?
i have an arc entity, which is drawn in it's own ocs. center point of this entity is:
x = 10
y = 7.5
z = 0
dwgdirect library shows center point in wcs:
x = 4.2310360496972
y = 7.2014349735174
z = -9.2998746372391
i want to get coordinates in ocs, so i call :
point.transformby(odgematrix3d::worldtoplane(parce nt->normal()));
but i get these coordinates:
x = 6.9700347049984
y = -10.376348886343
z = 0
how can i get the real ocs coordinates(10,7.5,0)
am i doing something wrong, or is this just not possible?
i have attached the file.
regards, tomaz
attached files
you can use odgematrix3d::worldtoplane(odgevector3d normal) and odgematrix3d::planetoworld(odgevector3d normal) to get ocs<->wcs transforms.
note that most functions in dd return wcs coordinates.


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