# fz_objt_fact_create_hole_curv

Description

Creates a new, closed curve in a given face by connecting the points given in the pindx array. The curve delinates a hole in the face and its direction must be opposite to the direction of the outer boundary curve of the face. The pindx array holds the indices to the coordinate points of the object. Most likely, the coordinates of the object were previously created with (). The index of the new curve is optionally returned in the cindx parameter

Plugin Prototype

fzrt_error_td fz_objt_fact_create_hole_curv(

fzrt_int | windex,
fz_objt_ptr | obj,
fzrt_int | findx,
fzrt_int * | pindx,
fzrt_int | npindx,
fzrt_int * | cindx )

Parameters

windex [Input]

project window index

obj [Input]

object

findx [Input]

the index of the face into which to insert the hole curve

pindx [Input]

array of point indices to connect

npindx [Input]

number of point indices in array

cindx [Result, Optional]

index of new curve

Returns

Error codes

Availability

5.0.0.0

Plugin Example

fz_xyz_td pts[8]; fzrt_int pindx[8]; fz_objt_ptr new_obj;
fz_objt_cnstr_objt_new(windex,&new_obj); pts[0] = { 0.0, 0.0, 0.0}; pts[1] = {100.0, 0.0, 0.0}; pts[2] = {100.0,100.0, 0.0}; pts[3] = { 0.0,100.0, 0.0}; pts[4] = { 20.0, 20.0, 0.0}; pts[5] = { 20.0, 80.0, 0.0}; pts[6] = { 80.0, 80.0, 0.0}; pts[7] = { 80.0, 20.0, 0.0}; fz_objt_fact_add_pnts(windex,new_obj,pts,4); pindx[0] = 0; pindx[1] = 1; pindx[2] = 2; pindx[3] = 3; fz_objt_fact_create_face(windex,new_obj,pindx,4,&findx); pindx[0] = 4; pindx[1] = 5; pindx[2] = 6; pindx[3] = 7; fz_objt_fact_create_hole_curv(windex,new_obj,findx,pindx,4,NULL);
The sample code above creates a new object and adds 8 points. The first 4 points are connected to form a square face. The face connects points number 0,1,2 and 3 in this order. Points 5 to 8 are connected to form a hole in the face with the api call fz_objt_fact_create_hole_curv. Note, that points 5 to 8 are defined in the opposite direction of points 1 to 4.

Example Files

util_objt_cnstr_lowlevel.fsl

See Also

,

Function Set

fz_model_fset

Defined in

fz_objt_api.h