[CONNECT C++] ICurvePrimitive and projecting points to a "curve"

If I have an element (e.g. line or linesting) and a point (DPoint3d), I can use ClosestPointBounded(DPoint3dR, CurveLocationDetailR, bool,bool) to obtain a CurveDetail, then use FractionToPoint() to obtain the "closest point on the curve". The returned "fraction" seems to be the same regardless if I pass "true" or "false" as the last two parameters, as does the "distance from space point" value. I am looking for some way to ultimately determine if the returned "closest point" lies "on" or "off" the start/end of the subject curve. Is it possible?


  • Hi Bruce,

    I checked the API actually the last two bool values allow the curve to extend, either from start or end. e.g It is to handle the case where point is lying on line but not on segment. Let us say you have line segment passing thorough (0,0) to (1,1) and your space point is (2,2) so space point lies on line but not on segment in such case do you want to extend the line segment and check. First bool will extend the segment from start and second bool will extend the segment from end. Currently we do not have mechanism but to compare space point with actual start and end point of segments.


    Vajradehi Yadav