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

yang686526 2009-05-05 11:38 AM

【转帖】giworlddrawdumper
 
giworlddrawdumper
giworlddrawdumper
if i have a oddbpoint element and invoke the worlddraw method passing in a class modeled off of the giworlddrawdumper example, what method(s) should i expect to called? there does not appear to be any method to deal with points.
on a slightly different topic, is there any way to tell the dwg direct library to substitute ttf fonts for the shx fonts? i would like to be able to use the ttf versions of the shx fonts (ie always use simplex.ttf in place of simplex.shx)
regards,
steve

about point. what you receive depends on regentype (returned by odgiworlddraw::regentype()) and database's pdmode and pdsize variables.
the appearance of oddbpoint entity is not always single point. the database's pdmode variable is set of flags, defining set of shapes making up oddbpoint appearance - different crosses, circles, point, etc. the database's pdsize variable is oddbpoint entity size (it is actual when it is drawn not by single point). if pdsize>0 then it is in model coordinates, else it is negated number of percents of viewport height. in case negative pdsize and unknown viewport (regentype kodgisaveworlddrawforproxy or kodgiforextents) and in case pdmode == 0 oddbpoint rendered as ofgiworldgeometry::polyline with two coincident points. in all other cases oddbpoint::worlddraw will return false, for compatibility with autocad. all rendering will be performed in viewportdraw().
sincerely yours,
george udov
quote:
originally posted by steve
on a slightly different topic, is there any way to tell the dwg direct library to substitute ttf fonts for the shx fonts? i would like to be able to use the ttf versions of the shx fonts (ie always use simplex.ttf in place of simplex.shx)
hello steve
you can find description
--
best regards,
sergey zaitcev
george,
the implementation of regentype() for my class still has the original behaviour as the example, ie it always returns kodgiforexplode.
sergey,
i am still a little confused as to how to use exhostappservices::getpreferablefont. as a quick test i implemented it to always return <path_to_font>/arial.ttf, but nothing changes. what exactly should get returned from this method?
regards,
steve
last edited by skram; 23rd july 2004 at 04:31 amfff">.

quote:
originally posted by skram
the implementation of regentype() for my class still has the original behaviour as the example, ie it always returns kodgiforexplode.
in this case oddbpoint::worlddraw() doesn't return any geometry. oddbpoint can't be exploded.
sincerely yours,
george udov
quote:
originally posted by skram
sergey,
i am still a little confused as to how to use exhostappservices::getpreferablefont. as a quick test i implemented it to always return <path_to_font>/arial.ttf, but nothing changes. what exactly should get returned from this method?
getpreferablefont() can return either full path file or file name only. after using its dwgdirect calls exhostappservices::findfile() method which must return full path. dd uses font from text style in case findfile() returns empty string. you can have own implemention findfile() method.
--
best regards,
sergey zaitcev


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