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

acdb3dPolyline::intersectWith bug with the Z coordinate in Acad 2008

3 REPLIES 3
Reply
Message 1 of 4
Anonymous
462 Views, 3 Replies

acdb3dPolyline::intersectWith bug with the Z coordinate in Acad 2008

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.

 

3 REPLIES 3
Message 2 of 4
artc2
in reply to: Anonymous

That's a bug in how this intersectWith is implemented in 3dpolyline. And, it appears to still be that way.  I'll see about getting it fixed.

Message 3 of 4
Anonymous
in reply to: artc2

thanks much.

I want to get the intersection point on Acdb3dPolyline, then use "getParamAtPoint" to get the param ,but now the intersection point has wrong Z value?  what can I do if I still want to get param of the intersection point on this Acdb3dPolyline?

Message 4 of 4
owenwengerd
in reply to: Anonymous

If the returned points are otherwise correct, you could project them manually back onto the source 3d polyline. For that you can either calculate it manually or call the other form of intersectWith and pass a line that passes through the returned point and is orthogonal to the projection plane.

--
Owen Wengerd
ManuSoft

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

Post to forums  

Autodesk Design & Make Report

”Boost