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

yang686526 2009-05-07 06:57 PM

【转帖】when Is Linetypegenerationcriteria Called
 
when is linetypegenerationcriteria called?
when is linetypegenerationcriteria called?
in my odgsbasevectorizedevice/odgigeometrysimplifier override i want to selectively receive lines and arcs with or without linetype segmentation. the choise made this way:
if our native application can support the current linetype, then we do not want oda to "segmentize" the line or arc. if the linetype definition cannot be translated to a native linetype, then we want the segmentation done by oda.
currently i detect and examine the current linetype by overriding ontraitsmodified(). then on the next linetypegenerationcriteria() call i return dbl_max if we can do the linetype ourselves.
but that depends on a call sequence where oda first calls ontraitsmodified when the effective linetype of the object is set and then will call linetypegenerationcriteria() before it decides to segmentize or not.
will this methode work, or is there a safer way?
-rune jorgensen
www.dds.no
hi,
>>will this method work, or is there a safer way?
i think, it should. why would not you try ?
you can also use setlinetypescalemultiplier(0.0) to disable linetyping, but don't forget to store original value to enable later. or you can override linetypescalemultiplier() to return 0.0 when you don't want line type to be applied and return whatever base class returned when you do.


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