Quantcast
Channel: MicroStation Programming - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 383

[v8i c++] mdlMesh_intersectDPlane3dPolyfaceMesh

$
0
0
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;
}

Viewing all articles
Browse latest Browse all 383

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>