![]() |
【转帖】oddbfcf calculation of bounding box is incorrec
oddbfcf: calculation of bounding box is incorrect
oddbfcf: calculation of bounding box is incorrect hello, i am creating geometrical tolerances using the following function: int addtolerance(double posx, double posy, double scale, char* tolerancetext, int blockid, int playerid) { //get the ids of different objects oddbobjectid layerid = pobjarr->at(playerid); //get the blocktablerecord oddbblocktablerecordptr bbtr = getblockobjectid(blockid); oddbfcfptr ptol = oddbfcf::createobject(); oddbobjectid tolid = bbtr->appendoddbentity(ptol); ptol->setdatabasedefaults(bbtr->database()); /************************************************** ********************/ /* set the properties */ /************************************************** ********************/ odstring odtolerancetext = stringhelper::utf8toodstring(tolerancetext); ptol->setdatabasedefaults(pdb); odgepoint3d point(posx,posy,0); ptol->setlocation(point); ptol->settext(odtolerancetext); ptol->setdimscale(scale); if (layerid) { ptol->setlayer(layerid, false); } odgeextents3d extents; ptol->getgeomextents(extents); //draw the diagonal of the bounding box (minpoint to maxpoint) oddblineptr pline = oddbline::createobject(); pline->setstartpoint(extents.minpoint()); pline->setendpoint(extents.maxpoint()); bbtr->appendoddbentity(pline); //add it to the block, return the id return pobjarr->append(tolid); } i pass the following strings for creating the different tolerances in the example dxf file (attached .dxf file). - "{\\fgdt;b}%%v0.003%%vab" fff">(lowest tolerance on the drawing) - "{\\fgdt;h}%%v0.003%%vbc - "{\\fgdt;i}%%v0.003%%va - "{\\fgdt;r}%%v0.003%%va"fff"> (highest tolerance on the drawing) the diagonal of the bounding box is also drawn in the different geometrical tolerances (see attached .dxf file). my question now: why is the bounding box longer than the geometrical tolerance box? i would expect that the bounding box is equal to the geometrical tolerance box. i need to know the length of the geometrical tolerance box. cheers and thanks, christoph attached files hello christoph, i suppose there is problem with fonts file (one or both, isocp.shx and gdt.shx) which are used in rendering tolerance. are this fonts accessible in your application? possible build-in dwgdirect fonts are used during creating file and real fonts are used then you see drawing for example in acad. best regards, sergey z. |
所有的时间均为北京时间。 现在的时间是 01:53 AM. |