formZ SDK | 5.0 API Reference | Project | Modeling | Objects | Analysis
Description
Finds the closest point on a segment from a given point. The returned information contains the closest point, the distance of the original point to the closest point and a flag that tells, whether the closest point is between the segment end point (1), or on either segment end point (2).
Plugin Prototype
fzrt_error_td fz_objt_alys_closest_pnt_on_segt(
fzrt_int | windex, |
obj, | |
fzrt_int | sindx, |
model_type, | |
pt, | |
closest_pt, | |
double * | dist, |
fzrt_int * | where ) |
Parameters
windex [Input]
project window index
obj [Input]
object
sindx [Input]
segment index
model_type [Input]
object topology type. FZ_OBJT_MODEL_TYPE_UNSPEC may be used to use the object's natural model type.
pt [Input]
the point to for which to find the closest point on the segment.
closest_pt [Result, Optional]
the closest point on the segment
dist [Result, Optional]
the distance of the closest point to the original point
where [Result, Optional]
1 if the closest point is inside the segment and 2 if it is on a segment end point
Returns
Error codes
Availability
6.0.0.0
Function Set
Defined in