Message 1 of 5

Not applicable
12-09-2020
12:34 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
int out = 0;
//////////////////////////////////////////////////
AcDbEntity* pEnt1;
AcDbEntity* pEnt2;
AcGePoint3d pick;
AcDbObjectId id1;
AcDbObjectId id2;
Acad::ErrorStatus es;
AcGePoint3dArray is;
//////////////////////////////////////////////////
acdbGetObjectId(id1, tempEN1);
acdbOpenAcDbEntity(pEnt1, id1, AcDb::kForRead);
acdbGetObjectId(id2, tempEN2);
acdbOpenAcDbEntity(pEnt2, id2, AcDb::kForRead);
//////////////////////////////////////////////////
es = pEnt1->intersectWith(pEnt2, AcDb::kOnBothOperands, is);
//////////////////////////////////////////////////
if (es != Acad::eOk)
{
acutPrintf(_T("\nIntersectWith failed : es = %s"), acadErrorStatusText(es));
}
else
{
out = is.length();
for (int i = 0; i<is.length(); i++)
{
if (i == 0) acdbPointSet(asDblArray(is[0]), subPO1);
else if (i == 1) acdbPointSet(asDblArray(is[1]), subPO2);
else if (i == 2) acdbPointSet(asDblArray(is[2]), subPO3);
else if (i == 3) acdbPointSet(asDblArray(is[3]), subPO4);
else if (i == 4) acdbPointSet(asDblArray(is[4]), subPO5);
else if (i == 5) acdbPointSet(asDblArray(is[5]), subPO6);
else if (i == 6) acdbPointSet(asDblArray(is[6]), subPO7);
else if (i == 7) acdbPointSet(asDblArray(is[7]), subPO8);
else if (i == 😎 acdbPointSet(asDblArray(is[8]), subPO9);
else if (i == 9) acdbPointSet(asDblArray(is[9]), subPO10);
}
}
pEnt1->close();
pEnt2->close();
//////////////////////////////////////////////////
return out;
The intersectWith() function works fine, but the number of AcGePoint3dArrays is 0..
What is the problem??
Solved! Go to Solution.