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

yang686526 2009-05-05 09:27 AM

【转帖】entities not being vectorized
 
entities not being vectorized
entities not being vectorized
environment:
windows xp pro
visual studio .net 2003
dwgdirect 1.11.01.00
i'm trying to convert a toolkit/viewkit application to dwgdirect and i'm having problems vectorizing certain entities.
i've used a lot of the code in the odvectorizeex example project.
i use exsimpleview::draw(const odgidrawable* pdrawable) to examine each entity before it's vectorized, as suggested in the help file. this works fine, it always picks up all the entities in the file.
however, i have a file (which read in fine in the toolkit/viewkit application) where not all of the entities are vectorized. the file consists of one insert block(which itself is a few simple shapes: lines, arcs, circle, etc.) that is inserted a few times in different ways, translated, skewed, stretched, etc.
some of the entities are vectorized by exsimpleview:olyline(...) but some of them aren't picked up by anything. in particular, arcs and circle in a stretched insert don't appear. i thought exsimpleview::elliparc(...) might pick them up, but it doesn't.
any help would be much appreciated.
have you tried to dump the file with odvectorizeex sample?
where can be a lot of possible reasons why your elliparc is not called.
note that arcs/circles with non-zero thickness are rendered via shell primitive.
if block reference has spatial clip they may be clipped.
if your elliparc() has wrong prototype - it will not get called...
sergey slezkin
thanks for the reply.
yes i've tried to dump the file with odvectorizeex. the only output i get is from the exsimpleview::draw(...) function. the attached .zip file includes output.txt which is the dumped output. also in the .zip file is the original .dxf file.
i've checked the thickness of all the entities and they're all zero.
i have another file with an ellipse in and exsimpleview::elliparc(...) gets called fine, so i'm pretty sure it has the right prototype.
the idea of it being clipped sounds promising... how do i tell if it's being clipped? the application i'm writing always wants all the entities to be picked up, so i need to set a view that's big enough to see everything. how do i do this? i assumed that the default view would automatically fit everything in, but it seems as if this may not be the case.
many thanks.
attached files (1.2 kb, 6 views)

the reason why you don't get geometry is that all entities in attached file are out of screen and clipped off.
if you want to get all geometry you need to setup view accordingly to entities' extents.
where are 2 methods: to tune the view only like in odamfcapp sample: cdwgviewer::onviewzoomextents()
or to modify the database (perform zoom extents in active layout) like in odwriteex sample (dbfiller.cpp - search for zoomextents) or in odamfcapp ( codamfcappdoc::oneditzoomextents() )
sergey slezkin
thanks sergey - it works now!


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