[CE update 11 MDL] mdlSolid_closestPointOnBody, primitive solid and smart solid

Hello,

My system is windows 7, vs 2015 and CE update 11

My quastion is about mdlSolid_closestPointOnBody

When body is primitive solid output distance is correct.

However, if body is smart solid, output distance is wrong.

In both cases, output  PointOutP is correct.

Appriciate any help.

Thanks

Nenad

Parents Reply
  • I recommend using the C++ SolidUtil api for new code, it's much easier to use/understand than the old mdlSolid api with it's mdlcurrtrans.

    You would use SolidUtil::Convert::ElementToBody (or ElementToBodies) to get ISolidKernelEntity(s) from an element's geometry. You can then call SolidUtil::ClosestPoint to get back the closest point on the body from the supplied point.

    Input and output coordinates are always uors, so no mdlcurrtrans or body->uor transform to take into account. If you want the distance, just call testPoint.Distance(closePoint).

    HTH



    Answer Verified By: Nenad Poljcic 

Children