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

mdlRegion_floodFillWithHoles broken in Connect?

$
0
0
mdlRegion_floodFillWithHoles seems to be broken in Connect, at least through the managed interfaces. I've tried calling it with the following definition that works fine in V8I using the exact same dataset. The result is MDLERR_NULLSOLUTION.
Slumming it in VBA and using the GetFloodBoundary function also fails with the same error code so it seems something is generally broken. Again, this works fine in v8i and the code is I believe correctly written to work on both 32 bit and 64 bit environments.
Other functions I've written this way work fine in 64 bit so this function seems to be an outlier.
A code snipped of the calling method is as follows:
foreach (var e in boundaryElems)
{
 IntPtr elemDescrP = new IntPtr(e.MdlElementDescrP(true));
 CSMDL.mdlElmdscr_initOrAddToChain(out elemChainP, elemDescrP);
}
int viewIndex = 1;
IntPtr templateP = (IntPtr)templateElem.MdlElementDescrP(true);
IntPtr modelRefP = (IntPtr)MSA.ActiveModelReference.MdlModelRefP();
IntPtr floodP;
double area;
// Get coordinates into an array;
double[] seedPtv = new double[3] { seedPoint.X, seedPoint.Y, seedPoint.Z };
                   
unsafe {
 fixed (double *seedP = seedPtv)
 {
  var result = CSMDL.mdlRegion_floodFillWithHoles(out floodP, out area, elemChainP, templateP, modelRefP, (IntPtr)seedP, viewIndex, 0, 0.0, 0);
    // returns MDLERR_NULLSOLUTION
 }
}
Any ideas? I'd be willing to rewrite this using the MstnPlatformNET SDK if someone could point me towards the namespace or functions that would assist this task, since the documentation is nonexistent.

Viewing all articles
Browse latest Browse all 7260

Trending Articles



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