I use the function setAngles to make a semicircle ,but the semicircle'angle is not 180 degree,it is mybe 179 degree. i was mixed-up,why????? my plaform is VS2005(C++)+arx2008,
code:
double PI = 3.14159265358979323846;
AcGeCircArc3d *cirArc = new AcGeCircArc3d();
cirArc->setAngles(0.0, PI);
AcGeIntArray edgeTypes;
AcGeVoidPointerArray edgePtrs;
edgeTypes.append(AcDbHatch::kCirArc);
edgePtrs.append((void*)cirArc);
Hatch1->appendLoop(AcDbHatch::kDefault, edgePtrs, edgeTypes);
es=Hatch1->evaluateHatch();
what is the problem???
Solved! Go to Solution.
Solved by Balaji_Ram. Go to Solution.
Hi,
This isnt a problem of the setAngles. The hatch boundary only has the circular arc without a closing edge and this is causing it to hatch incorrectly. You can try including a closing line for the hatch to fill it correctly.
const double PI = atan(1.0) * 4.0; AcGeCircArc3d *cirArc = new AcGeCircArc3d(); cirArc->set(AcGePoint3d::kOrigin, AcGeVector3d::kZAxis, AcGeVector3d::kXAxis, 2.0, 0.0, PI); AcGeLine3d *line3d = new AcGeLine3d(cirArc->endPoint(), cirArc->startPoint()); AcGeIntArray edgeTypes; edgeTypes.append(AcDbHatch::kCirArc); edgeTypes.append(AcDbHatch::kLine); AcGeVoidPointerArray edgePtrs; edgePtrs.append((void*)cirArc); edgePtrs.append((void*)line3d); pHatch->appendLoop(AcDbHatch::kDefault, edgePtrs, edgeTypes);