formZ SDK | 5.0 API Reference | Project | Modeling | Objects | Analysis

fz_objt_alys_proj_pnt_on_segt

Description

Projects a point on a segment. The returned information contains the projected point, the distance of the original point to the projected point and a flag that tells, whether the projected point is between the segment end points (1), on a segment endpoint (2) or outside the segment end points (0)
For smooth segments, the function will return an error, if the point cannot be projected on the segments.

Plugin Prototype

fzrt_error_td fz_objt_alys_proj_pnt_on_segt(

fzrt_int

windex,

fz_objt_ptr

obj,

fzrt_int

sindx,

fz_objt_model_type_enum

model_type,

fz_xyz_td *

pt,

fz_xyz_td *

proj_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 project

proj_pt [Result, Optional]

the projected point of the segment

dist [Result, Optional]

the distance of the projected point to the original point

where [Result, Optional]

0 if the point is outside the segment, 1 if it is inside the segment and 2 if it is on a segment end point

Returns

Error codes

Availability

5.0.0.0

Function Set

fz_model_fset


Defined in

fz_objt_alys_api.h