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

# fz_objt_alys_proj_pnt_on_face

Description

Projects a point on a face. 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 inside (1), on (2) or outside (0) the face boundary. Note, that when the model_type is facetted and the face is non planar, the projected point may not be accurate, as the plane equation of a non planar face is not well defined.
For smooth faces, the function will return an error, if the point cannot be projected on the face.

Plugin Prototype

fzrt_error_td fz_objt_alys_proj_pnt_on_face(

fzrt_int | windex,
fz_objt_ptr | obj,
fzrt_int | findx,
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

findx [Input]

face 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 face surface

dist [Result, Optional]

the distance of the projected point to the original point

where [Result, Optional]

0 if the point is outside, 1 if it is inside and 2 if it is on the face's boundary

Returns

Error codes

Availability

5.0.0.0

Function Set

fz_model_fset

Defined in

fz_objt_alys_api.h