Am I doing something wrong here?
mdlMesh_intersectDPlane3dPolyfaceMesh is not returning anything..
Thanks ahead of time!
std::vector<DPoint3d> Get_MeshSegments(MSElementDescrP MeshHdr, DPlane3d Plane){
EmbeddedIntArray *pIndices = jmdlEmbeddedIntArray_grab ();
EmbeddedDPoint3dArray *pXYZ = jmdlEmbeddedDPoint3dArray_grab ();
EmbeddedDPoint3dArray *pIntersectionXYZ = jmdlEmbeddedDPoint3dArray_grab ();
int blockSize = 0;
std::vector<DPoint3d> Results;
if ( NULL != pIndices && NULL != pXYZ && SUCCESS == mdlMesh_getPolyfaceArrays (MeshHdr, pIndices, NULL, &blockSize, NULL)){
mdlMesh_intersectDPlane3dPolyfaceMesh(pIntersectionXYZ, NULL, NULL, &Plane, pXYZ, pIndices, blockSize);
printf("%d\n", blockSize);
int ArrSize = jmdlEmbeddedDPoint3dArray_getCount(pIntersectionXYZ);
printf("Count: %d\n", ArrSize);
for(int i = 0; i < ArrSize; i++){
DPoint3d p;
jmdlEmbeddedDPoint3dArray_getDPoint3d(pIntersectionXYZ, &p, i);
Results.push_back(UOR_To_Point(p));
}
}
jmdlEmbeddedDPoint3dArray_drop (pXYZ);
jmdlEmbeddedIntArray_drop (pIndices);
jmdlEmbeddedDPoint3dArray_drop (pIntersectionXYZ);
return Results;
}