ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

why the setAngles function show the imprecision angles

1 REPLY 1
SOLVED
Reply
Message 1 of 2
Anonymous
755 Views, 1 Reply

why the setAngles function show the imprecision angles

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???

Tags (2)
1 REPLY 1
Message 2 of 2
Balaji_Ram
in reply to: Anonymous

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);

 



Balaji
Developer Technical Services
Autodesk Developer Network

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost