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

yang686526 2009-05-04 03:05 PM

【转帖】a dimsension line position problem in a rotated dimension
 
a dimsension line position problem in a rotated dimension
a dimsension line position problem in a rotated dimension
hi,
i've got a newby question about the dimension line position in a rotated dimension.
in the case of a horizontal dim, if the y coordinate of the start and end points is the same, then the dim line is placed at the pointed position, however if the y coordinate is very different, the position of the dim line is (apparently) random.
how can i be sure that the "setdimlinepoint()" method will place the dim line at the given point? i' ve been looking for any system variable but i have not find such a one.
everything is ok with the aligned dimensions.
thanks in advance,
hotsouce

autocad sets dimlinepoint to position where vector (xline2point-dimlinepoint) is parallel to vector odgevector3d::kyaxis rotated by rotation angle (or, in case precense of oblique, rotangle-(pi/2-oblique)) around z axis. (all coordinates are in ocs)
dwgdirect 1.10 contains bug validating dimlinepoint, it will be fixed in next release.
but this bug doesn't issue if dimlinepoint is set to correct position (position to that acad places it)
sincerely yours,
george udov

hi, george.
thank you for the reply.
i made the following test, taking in mind your words:
code:
oddbrotateddimensionptr pdim = oddbrotateddimension::createodobject();
const odgepoint3d pt1(100,200,1);
const odgepoint3d pt2(200,100,1);
const odgepoint3d ptdim(150,150,1);
pdim->setxline1point(pt1);
pdim->setxline2point(pt2);
pdim->setdimlinepoint(ptdim);
i expected that the dim line will be horizontally placed at the point with coordinates: x = 150, y = 150;
so the result was: a horizontal dim line wtih coordinate y = 100;
i tried to find some dependence and to adjust the position with some other private cases but the result i got was randomized.
is this a problem of dd or maybe i didn't give correct coordinates?
thanks again
hotsouce

it is a problem of dd (as i written above), that is fixed, fix will be available in next release. you can get around it setting ptdim to (200, 150, 1), as acad does for such dimensions.
sincerely yours,
george udov


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