acdb3dPolyline::intersectWith bug with the Z coordinate in Acad 2008
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I have three entities, a AcdbLine[(0,0,1),(10,10,10)], a AcdbPolyline,and a Acdb3dPolyline[(1,10,1),(10,0,10)]. they have different Z value(not Zero).
execute the code below:
AcDbObjectPointer<AcDbCurve> pCurve1(idPLs[0],AcDb::kForRead),pCurve2(idPLs[1],AcDb::kForRead);
AcGePoint3dArray pt3dNodes;
pCurve1->intersectWith(pCurve2,AcDb::kOnBothOperands,AcGePlane::kXYPlane,pt3dNodes);
if (!pt3dNodes.isEmpty())
{
acutPrintf(_T("\nZ:%g"),pt3dNodes.first().z);
}
as the ARX SDK says "it projects this entity and the pEnt entity onto the projPlane, finds the intersection points, and then projects the intersection points back onto this entity. So, all points appended to the points array will be on this entity. "
if pCurve1 is Acdb3dPolyline, the intersection point is on pCurve2. why? bug?
if pCurve1 is not Acdb3dPolyline, works well as the SDK says.