fz_objt_fact_link_faces

Description

Links faces at their seams.
This function is usually called after new faces were created via . Note, that faces are only linked together if their edges are reversely coincident. That is, if the segment of one face goes from pindx 'm' to pindx 'n', the neighboring face's segment must run from pindx 'n' to pindx 'm'.

Plugin Prototype

fzrt_error_td fz_objt_fact_link_faces(

fzrt_int

windex,

fz_objt_ptr

obj )

Parameters

windex [Input]

project window index

obj [Input]

object

Returns

Error codes

Availability

5.0.0.0

Plugin Example

fz_xyz_td pts[4]; fzrt_int pindx[4]; fz_objt_ptr new_obj;
// MAKE A NEW EMPTY OBJECT fz_objt_cnstr_objt_new(windex,&new_obj);
// PREALLOCATE STORAGE : 6 FACES, 6 CURVES, 24 SEGMENTS AND 8 POINTS fz_objt_fact_allocate(windex,new_obj,6,6,24,8);
// STORE THE 8 POINTS 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] = { 0.0, 0.0,100.0}; pts[5] = {100.0, 0.0,100.0}; pts[6] = {100.0,100.0,100.0}; pts[7] = { 0.0,100.0,100.0}; fz_objt_fact_add_pnts(windex,new_obj,pts,8);
// CREATE THE 6 FACES pindx[0] = 0; // BOTTOM pindx[1] = 1; pindx[2] = 2; pindx[3] = 3; fz_objt_fact_create_face(windex,new_obj,pindx,4,NULL);
pindx[0] = 7; // TOP pindx[1] = 6; pindx[2] = 5; pindx[3] = 4; fz_objt_fact_create_face(windex,new_obj,pindx,4,NULL);
pindx[0] = 0; // FRONT pindx[1] = 1; pindx[2] = 5; pindx[3] = 4; fz_objt_fact_create_face(windex,new_obj,pindx,4,NULL);
pindx[0] = 1; // RIGHT pindx[1] = 2; pindx[2] = 6; pindx[3] = 5; fz_objt_fact_create_face(windex,new_obj,pindx,4,NULL);
pindx[0] = 2; // BACK pindx[1] = 3; pindx[2] = 7; pindx[3] = 6; fz_objt_fact_create_face(windex,new_obj,pindx,4,NULL);
pindx[0] = 3; // LEFT pindx[1] = 0; pindx[2] = 4; pindx[3] = 7; fz_objt_fact_create_face(windex,new_obj,pindx,4,NULL);
// LINK ALL FAFES TO FORM A SOLID fz_objt_fact_link_faces(windex,new_obj);
The sample code above creates a cube shaped object. The last function call, fz_objt_fact_link_faces, links all the faces at their seams and creates a solid object. If that call were not made, the object would stay a surface object with six unlinked faces.

Example Files

util_objt_cnstr_lowlevel.fsl
tool_star.fsl

Function Set

fz_model_fset


Defined in

fz_objt_api.h