几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】measure distance on the screen (http://www.dimcax.com/hust/showthread.php?t=17156)

yang686526 2009-05-06 05:30 PM

【转帖】measure distance on the screen
 
measure distance on the screen
measure distance on the screen
hi,
i'd like to extend my dwg-viewer with the ability to
measure distances on the screen.
how can i do that?
m_pdevice->onsize(odgsdcrect(0, 1000, 1000, 0));
m_pdevice->update();
how do i know the distance betwenn the screen-points
(0,0) and (100, 100)?
i've found getmeasurement(), getinsunits(),
objecttodevicematrix() and other, but i don't know how
to use them.
can anybody help?
bye, holger.
measure distance on the screen
hi,
i've found getworldstartendpoints in odamfcapp.
it's a good sample for converting screen to wcs.
for a well known line on screen i get a distance of 7,6
and it should be 7,6 m.
but:
getinsunits returns kunitsmillimeters!
so what am i still missing?
bye, holger.
usually the modelspace units are logical units and not meters, inches, etc. insunits are used when inserting blocks from outer drawings, in order to match between the interpretation of the different units. so you can show your measures in units, or maintain your own variable for units.
hope this helps.
best regards
chudomir


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