drawing a layout and getting the same coordinates as autocad
drawing a layout and getting the same coordinates as autocad
i want to call playouthelper->update() or whatever to initiate drawing of a layout. after a long nesting of calls, it ends at my implementation of:
mydevice:

olylineout(odint32 npoints, const odgepoint3d* ppoints)
when my polylineout is called, i want the coordinates in ppoints to be exactly the same as those i get when i use the autocad id command within the layout. and of course, i want all lines and polygons to be pre-clipped against the appropriate viewports inside the layout when i receive the polylineout/polygonout calls.
and most importantly, i do not want to of code anything of that myself. (no setting up clipping pipelines, etc, etc. no complex overriding in myview::update). i just want to call...
playouthelper->updatesothatlinesareclippedandcoordinatesbecometh esameasmeasuredwiththe_id_commandinautocad()
...and then receive calls with appropriate coordinates in my polylineout/polygonout implementation.
is there such a function today?
can i whish it for christmas?
is there a complete sample implementation of myview::update() that does exactly what i want? (i have tried some examples and i get pretty close. but i get an offset compared to the id command and i get a slight precision loss in the transformation matrixes.)
-rune jorgensen
www.dds.no
dear rune,
please substitute these lines:
code:
// comment function below to get primitives in eye coordinates.
odgematrix3d eye2screen(eyetoscreenmatrix());
odgematrix3d screen2eye(eye2screen.inverse());
seteyetooutputtransform(eye2screen);
(function exsimpleview::update(), file exgssampledevice.cpp, sample odvectorizeex)
by these lines:
code:
odgematrix3d eye2screen(eyetoscreenmatrix());
odgematrix3d screen2eye(eye2screen.inverse());
odgsview* pview0 = device()->viewat(0);
seteyetooutputtransform(pview0->worldtodevicematrix().inverse() * eye2screen);
i think, odvectorizeex will became in this case a sample of functionality that you need, won't it?
sincerely yours,
george udov