/*********************************************************************************************
 *                                                                                           *
 *                                                                                           *
 *   Copyright 1989-2018 by AutoDesSys, Inc.                                                 *
 *                                                                                           *
 *   This software and its associated documentation contains proprietary,                    *
 *   confidential, and trade secret information of AutoDesSys Inc. and may not be            *
 *   disclosed, copied in any form, or used for any purpose except as specifically           *
 *   permitted in writing by AutoDesSys, Inc.                                                *
 *                                                                                           *
 *   AutoDesSys, Inc. grants permission to use the software to those who purchase            *
 *   a license.  Such a usage will be made according to the terms and conditions             *
 *   specified in the license agreement to which a licensee agrees before installing         *
 *   and commencing usage of the software.  The license agreement can be found               *
 *   on the envelop that contains the software CD.                                           *
 *                                                                                           *
 *   AutoDesSys, Inc. also grants permission to licensees to develop extensions to           *
 *   the software, which can be in the form of scripts or plugins.  The permission           *
 *   includes calling the API and call back functions provided by AutoDesSys, Inc.           *
 *   and accessing information relevant to these functions and the general workings          *
 *   of form.Z, but only up to the point to which AutoDesSys, Inc. has chosen to             *
 *   expose, through its form.Z SDK Manual.  All extensions developed by third               *
 *   parties will include a copy of this copyright note in an easily accessible place or     *
 *   a clear instruction to read this original note by AutoDesSys, Inc.                      *
 *                                                                                           *
 *   All the software distributed under a license, either for the purpose of using it or     *
 *   for the purpose of developing extensions, is distributed AS IS, WITHOUT                 *
 *   WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, AND                                    *
 *   AutoDesSys, Inc. HEREBY DISCLAIMS ALL SUCH WARRANTIES,                                  *
 *   INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF                                         *
 *   MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.                                    *
 *                                                                                           *
 *   formZ, RenderZone, and RadioZity are registered trademarks of AutoDesSys, Inc.          *
 *                                                                                           *
 *   form.Z SDK, Version 8.6.3, Dec 03, 2018                                                 *
 *                                                                                           *
 *                                                                                           *
 *********************************************************************************************/


#ifndef _FORMZ_MODEL_PTCH_API_H
#define _FORMZ_MODEL_PTCH_API_H


#include "fz_model_core_api.h"

#ifdef __cplusplus
extern "C" {
#endif



/****************************************************************

	Patch Object


	Description
		formZ Model Patch objects. This module contains functions to construct and edit 
		Patch objects.
 ****************************************************************/

/****************************************************************

	FZ_OBJT_TYPE_PATCH


	Description
		Unique identifier for the Patch object type.
 ****************************************************************/


#define FZ_OBJT_TYPE_PATCH		"\x30\x7f\x3e\xd8\x3d\x41\x43\xcd\x83\xc0\x62\x63\x05\x62\xf4\xdf"

/****************************************************************

	fz_objt_patch_cnstr_opts_ptr


	Description
		Patch construction options. Data structure to hold options for the construction of a patch. 
		This type is used to pass additional construction options to the 
		function fz_objt_cnstr_patch_from_obj. The individual fields of this type 
		can be accessed and set via fz_objt_cnstr_patch_opts_get and 
		fz_objt_cnstr_patch_opts_set.

	Availability	5.0.0.0


	See Also
		fz_objt_cnstr_patch_from_obj,fz_objt_cnstr_patch_opts_get,fz_objt_cnstr_patch_opts_set

 ****************************************************************/
typedef struct ptch_cnstr_opts_td *fz_objt_patch_cnstr_opts_ptr;

/****************************************************************

	fz_objt_patch_parm_enum


	Description
		Patch parameter ids. Used for the 
		"which" argument of fz_objt_cnstr_patch_opts_get and fz_objt_cnstr_patch_opts_set

	Members
		FZ_OBJT_PATCH_CNSTR_OPTS_MAINTAIN_4_SIDED
			Construction - maintain 4-sided patches
			Type: fzrt_boolean
		FZ_OBJT_PATCH_CNSTR_OPTS_SUBDIVIDE
			Construction - subdivide
			Type: fzrt_boolean
		FZ_OBJT_PATCH_CNSTR_OPTS_DO_SMOOTH
			Construction - smooth
			Type: fzrt_boolean
		FZ_OBJT_PATCH_CNSTR_OPTS_SMOOTH_OUT
			Construction - smoothing out
			Type: fzrt_boolean
		FZ_OBJT_PATCH_CNSTR_OPTS_SMOOTH_IN_EQUAL
			Construction - smoothing in, equal portions
			Type: fzrt_boolean
		FZ_OBJT_PATCH_CNSTR_OPTS_SMOOTH_CURVATURE
			Construction - smoothness
			Type: double
			Range: 0.0

	Availability	5.0.0.0


	See Also
		fz_objt_cnstr_patch_opts_get,fz_objt_cnstr_patch_opts_set

 ****************************************************************/
typedef enum fz_objt_patch_parm_enum
{	FZ_OBJT_PATCH_CNSTR_OPTS_MAINTAIN_4_SIDED = 0,
	FZ_OBJT_PATCH_CNSTR_OPTS_SUBDIVIDE,
	FZ_OBJT_PATCH_CNSTR_OPTS_DO_SMOOTH,
	FZ_OBJT_PATCH_CNSTR_OPTS_SMOOTH_OUT,
	FZ_OBJT_PATCH_CNSTR_OPTS_SMOOTH_IN_EQUAL,
	FZ_OBJT_PATCH_CNSTR_OPTS_SMOOTH_CURVATURE,
	
	FZ_OBJT_PATCH_CNSTR_OPTS_MAX
} fz_objt_patch_parm_enum;



/****************************************************************

	fz_objt_patch_from_edge_dir_enum


	Description
		Construct patch from edge direction options

	Members
		FZ_OBJT_PATCH_ALIGN_PTCH_NORM
			Align with Patch normal
		FZ_OBJT_PATCH_PERP_PATCH
			Perpendicular to patch
		FZ_OBJT_PATCH_PARL_NORM_PLANE
			Parallel to plane normal
		FZ_OBJT_PATCH_PERP_NORM_PLANE
			Perpendicular to plane normal

	Availability	5.0.0.0


	See Also
		fz_objt_cnstr_patch_opts_get,fz_objt_cnstr_patch_opts_set

 ****************************************************************/

typedef enum fz_objt_patch_from_edge_dir_enum
{
	FZ_OBJT_PATCH_ALIGN_PTCH_NORM = 0,
	FZ_OBJT_PATCH_PERP_PATCH,
	FZ_OBJT_PATCH_PARL_NORM_PLANE,
	FZ_OBJT_PATCH_PERP_NORM_PLANE
	
} fz_objt_patch_from_edge_dir_enum;



/****************************************************************

	fz_objt_patch_attach_move_type_enum


	Description
		Attachment motion options

	Members
		FZ_OBJT_PATCH_ATTACH_MOVE_EDGE
			edge is moved
		FZ_OBJT_PATCH_ATTACH_MOVE_PATCH
			patch is moved
		FZ_OBJT_PATCH_ATTACH_MOVE_OBJECT
			whole object is moved

	Availability	5.0.0.0


	See Also
		fz_objt_cnstr_patch_opts_get,fz_objt_cnstr_patch_opts_set

 ****************************************************************/

typedef enum fz_objt_patch_attach_move_type_enum
{
	FZ_OBJT_PATCH_ATTACH_MOVE_EDGE	= 0,
	FZ_OBJT_PATCH_ATTACH_MOVE_PATCH,
	FZ_OBJT_PATCH_ATTACH_MOVE_OBJECT
	
	
} fz_objt_patch_attach_move_type_enum;
/****************************************************************

	fz_objt_cnstr_patch_opts_init



	Description
		Allocates patch construction options and fills with defaults.

	Parameters
		windex  [Input]
			project window index
		opts  [Result]
			construction options

	Returns
		Error codes


	Availability	5.0.0.0


	See Also
		fz_objt_cnstr_patch_opts_finit,fz_objt_cnstr_patch_opts_get,fz_objt_cnstr_patch_opts_set

 ****************************************************************/
typedef fzrt_error_td  (*fz_objt_cnstr_patch_opts_init_func) (
	fzrt_int						windex,
	fz_objt_patch_cnstr_opts_ptr	*opts
	);

/****************************************************************

	fz_objt_cnstr_patch_opts_get



	Description
		Gets a patch construction option.

	Parameters
		windex  [Input]
			project window index
		opts  [Input]
			construction options
		which  [Input]
			parameter identifier
		data  [Result]
			parameter data

	Returns
		Error codes


	Availability	5.0.0.0


	See Also
		fz_objt_cnstr_patch_opts_init,fz_objt_cnstr_patch_opts_finit,fz_objt_cnstr_patch_opts_set

 ****************************************************************/
typedef fzrt_error_td  (*fz_objt_cnstr_patch_opts_get_func) (
	fzrt_int					windex,
	fz_objt_patch_cnstr_opts_ptr		opts,
	fz_objt_patch_parm_enum	which,
	fz_type_td				*data
	);

/****************************************************************

	fz_objt_cnstr_patch_opts_set



	Description
		Sets a patch construction option.

	Parameters
		windex  [Input]
			project window index
		opts  [Input]
			construction options
		which  [Input]
			parameter identifier
		data  [Input]
			parameter data

	Returns
		Error codes


	Availability	5.0.0.0


	See Also
		fz_objt_cnstr_patch_opts_init,fz_objt_cnstr_patch_opts_finit,fz_objt_cnstr_patch_opts_get

 ****************************************************************/
typedef fzrt_error_td  (*fz_objt_cnstr_patch_opts_set_func) (
	fzrt_int					windex,
	fz_objt_patch_cnstr_opts_ptr		opts,
	fz_objt_patch_parm_enum	which,
	fz_type_td				*data
	);

/****************************************************************

	fz_objt_cnstr_patch_opts_finit



	Description
		Frees patch construction options.

	Parameters
		windex  [Input]
			project window index
		opts  [Input, Result]
			construction options (will become NULL)

	Returns
		Error codes


	Availability	5.0.0.0


	See Also
		fz_objt_cnstr_patch_opts_init,fz_objt_cnstr_patch_opts_get,fz_objt_cnstr_patch_opts_set

 ****************************************************************/
typedef fzrt_error_td  (*fz_objt_cnstr_patch_opts_finit_func) (
	fzrt_int				windex,
	fz_objt_patch_cnstr_opts_ptr	*opts
	);

/****************************************************************

	fz_objt_cnstr_patch_from_obj



	Description
		Creates a patch object from a source object.

	Parameters
		windex  [Input]
			project window index
		src_obj  [Input]
			source object
		do_coons  [Input]
			use Coons patch
		opts  [Input, Optional]
			construction options
		refn_opts  [Input, Optional]
			refinement options

	Returns
		Error codes


	Availability	5.0.0.0


	See Also
		fz_objt_cnstr_patch_opts_init,fz_objt_cnstr_patch_opts_finit, 
		fz_objt_cnstr_patch_opts_finit,fz_objt_cnstr_patch_opts_get

 ****************************************************************/
typedef fzrt_error_td  (*fz_objt_cnstr_patch_from_objt_func) (
	fzrt_int 				windex,
	fz_objt_ptr		    src_obj,
	fzrt_boolean		do_coons,
	fz_objt_patch_cnstr_opts_ptr	opts,
	fz_attr_refn_ptr	refn_opts
	);

/****************************************************************

	fz_objt_cnstr_patch_bezier



	Description
		Creates a Bezier patch object from 16 control points. 
		The points are passed in u major order 
		(i.e. cpts[0] .. cpts[3] are u { 0.0, 0.33, 0.67, 1.0 } at v == 0.0).

	Parameters
		windex  [Input]
			project
		cpts  [Input]
			control points
		refn_opts  [Input, Optional]
			refinement options
		obj  [Result]
			Bezier patch object

	Returns
		Error codes


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Utilities/util_objt_patch_attach.fsl
		../../../../Scripts/Samples/Utilities/util_objt_patch_divide.fsl
		../../../../Scripts/Samples/Utilities/util_objt_patch_from_edge.fsl
		../../../../Scripts/Samples/Utilities/util_objt_patch_udivide.fsl

	See Also
		fz_objt_cnstr_patch_opts_init,fz_objt_cnstr_patch_opts_finit, 
		fz_objt_cnstr_patch_opts_finit,fz_objt_cnstr_patch_opts_get

 ****************************************************************/
typedef fzrt_error_td  (*fz_objt_cnstr_patch_bezier_func) (
	fzrt_int 				windex,
	fz_xyz_td			*cpts,
	fz_attr_refn_ptr	refn_opts,
	fz_objt_ptr			*obj
	);

/****************************************************************

	fz_objt_cnstr_patch_from_prim_obj



	Description
		Creates a Bezier patch primitive object from a primitive object.

	Parameters
		windex  [Input]
			project window index
		src_obj  [Input]
			source object

	Returns
		MODEL_ERR_WRONG_OBJT_TYPE	- object passed in is not a patch


	Availability	5.0.0.0


	See Also
		fz_objt_cnstr_patch_opts_init,fz_objt_cnstr_patch_opts_finit, 
		fz_objt_cnstr_patch_opts_finit,fz_objt_cnstr_patch_opts_get

 ****************************************************************/

typedef fzrt_error_td	 (*fz_objt_cnstr_patch_from_prim_objt_func)(
	fzrt_int 		windex,
	fz_objt_ptr	 src_obj
	);
	
/****************************************************************

	fz_objt_cnstr_patch_from_edge



	Description
		Constructs a Patch object from one or more patch open edges given a 
		direction specified by the value of the fz_objt_patch_from_edge_dir_enum. 
		A new object is returned for each specified edge. 
		Note that the patch can be a triangular patch if do_trng_patch value is TRUE.

	Parameters
		windex  [Input]
			project window index
		src_obj  [Input]
			list of source objects
		edge_index  [Input]
			list of edge indexes
		edge_knt  [Input]
			number of  edges
		direction  [Input]
			enum for the direction
		do_trng_patch  [Input]
			triangular patch is built when TRUE
		ent_list  [Result]
			list of patch objects

	Returns
		MODEL_ERR_WRONG_OBJT_TYPE	- object passed in are not patches


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Utilities/util_objt_patch_from_edge.fsl

	See Also
		fz_objt_cnstr_patch_opts_init,fz_objt_cnstr_patch_opts_finit, 
		fz_objt_cnstr_patch_opts_finit,fz_objt_cnstr_patch_opts_get

 ****************************************************************/

typedef fzrt_error_td	 (*fz_objt_cnstr_patch_from_edge_func)(
	fzrt_int 							windex,
	fz_objt_ptr						*src_obj,
	fzrt_int							*edge_index,
	fzrt_int							edge_knt,
	fz_objt_patch_from_edge_dir_enum	direction,
	fzrt_boolean					do_trng_patch,
	fz_enty_list_ptr 				ent_list
	
	);

/****************************************************************

	fz_objt_cnstr_patch_from_open_edges



	Description
		Constructs a Patch object from every open edge of a patch object given a 
		direction specified by the value of the fz_objt_patch_from_edge_dir_enum. 
		A new object is returned for each specified edge. 
		Note that the patch can be a triangular patch if do_trng_patch value is TRUE.

	Parameters
		windex  [Input]
			project window index
		src_obj  [Input]
			source object
		direction  [Input]
			enum for the direction
		do_trng_patch  [Input]
			triangular patch is built when TRUE
		ent_list  [Result]
			list of patch objects

	Returns
		MODEL_ERR_WRONG_OBJT_TYPE	- object passed in are not patches


	Availability	5.0.0.0


	See Also
		fz_objt_cnstr_patch_opts_init,fz_objt_cnstr_patch_opts_finit, 
		fz_objt_cnstr_patch_opts_finit,fz_objt_cnstr_patch_opts_get

 ****************************************************************/
typedef fzrt_error_td	 (*fz_objt_cnstr_patch_from_open_edges_func)(
	fzrt_int 								windex,
	fz_objt_ptr							src_obj,
	fz_objt_patch_from_edge_dir_enum	direction,
	fzrt_boolean						do_trng_patch,
	fz_enty_list_ptr 					ent_list
);

/****************************************************************

	fz_objt_cnstr_patch_between_edges



	Description
		Constructs a Patch object between two, three or four patch edges.

	Parameters
		windex  [Input]
			project
		src_obj  [Input]
			source object
		edge_index  [Input]
			list of edge indexes
		edge_knt  [Input]
			number of edges
		do_trng_patch  [Input]
			triangular patch is built when TRUE
		new_obj  [Result]
			new patch object

	Returns
		MODEL_ERR_WRONG_OBJT_TYPE	- object passed in are not patches


	Availability	5.0.0.0


	See Also
		fz_objt_cnstr_patch_opts_init,fz_objt_cnstr_patch_opts_finit, 
		fz_objt_cnstr_patch_opts_finit,fz_objt_cnstr_patch_opts_get

 ****************************************************************/
	
typedef fzrt_error_td	 (*fz_objt_cnstr_patch_between_edges_func)(
	fzrt_int 			windex,
	fz_objt_ptr		*src_obj,
	fzrt_int			*edge_index,
	fzrt_int			edge_knt,
	fzrt_boolean	do_trng_patch,
	fz_objt_ptr		*new_obj
);

/****************************************************************

	fz_objt_edit_patch_divide_object



	Description
		Divides a Patch object n_div_dir1 by  n_div_dir2 times.

	Parameters
		windex  [Input]
			project
		src_obj  [Input]
			source object
		n_div_dir1  [Input]
			number of divisions in first direction
		n_div_dir2  [Input]
			number of divisions in second direction
		lock_points  [Input]
			lock points on both sides of divided edge when true

	Returns
		MODEL_ERR_WRONG_OBJT_TYPE	- object passed in is not a patch


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Utilities/util_objt_patch_divide.fsl
		../../../../Scripts/Samples/Utilities/util_objt_patch_udivide.fsl

	See Also
		fz_objt_cnstr_patch_opts_init,fz_objt_cnstr_patch_opts_finit, 
		fz_objt_cnstr_patch_opts_finit,fz_objt_cnstr_patch_opts_get

 ****************************************************************/
	
typedef fzrt_error_td	 (*fz_objt_edit_patch_divide_object_func)(
		fzrt_int 				windex,
		fz_objt_ptr			src_obj,
		fzrt_int				n_div_dir1,
		fzrt_int				n_div_dir2,
		fzrt_boolean		lock_points

);

/****************************************************************

	fz_objt_edit_patch_divide_face



	Description
		Divides a Patch face n_div_dir1 by  n_div_dir2 times.

	Parameters
		windex  [Input]
			project
		src_obj  [Input]
			source object
		findx  [Input]
			index of the face to be divided
		n_div_dir1  [Input]
			number of divisions in first direction
		n_div_dir2  [Input]
			number of divisions in second direction
		lock_points  [Input]
			lock points on both sides of divided edge when true

	Returns
		MODEL_ERR_WRONG_OBJT_TYPE	- object passed in is not a patch


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Utilities/util_objt_patch_divide.fsl
		../../../../Scripts/Samples/Utilities/util_objt_patch_udivide.fsl

	See Also
		fz_objt_cnstr_patch_opts_init,fz_objt_cnstr_patch_opts_finit, 
		fz_objt_cnstr_patch_opts_finit,fz_objt_cnstr_patch_opts_get

 ****************************************************************/
	
typedef fzrt_error_td	 (*fz_objt_edit_patch_divide_face_func)(
		fzrt_int 				windex,
		fz_objt_ptr			src_obj,
		fzrt_int				findx,
		fzrt_int				n_div_dir1,
		fzrt_int				n_div_dir2,
		fzrt_boolean		lock_points

);


/****************************************************************

	fz_objt_edit_patch_divide_segment



	Description
		Divides a Patch segment n_div_dir1 times.

	Parameters
		windex  [Input]
			project window index
		src_obj  [Input]
			source object
		eindx  [Input]
			index of the edge to be divided
		n_div_dir1  [Input]
			number of divisions
		lock_points  [Input]
			lock points on both sides of divided edge when true

	Returns
		MODEL_ERR_WRONG_OBJT_TYPE	- object passed in is not a patch


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Utilities/util_objt_patch_divide.fsl
		../../../../Scripts/Samples/Utilities/util_objt_patch_udivide.fsl

	See Also
		fz_objt_cnstr_patch_opts_init,fz_objt_cnstr_patch_opts_finit, 
		fz_objt_cnstr_patch_opts_finit,fz_objt_cnstr_patch_opts_get

 ****************************************************************/
	
typedef fzrt_error_td	 (*fz_objt_edit_patch_divide_segment_func)(
		fzrt_int 				windex,
		fz_objt_ptr			src_obj,
		fzrt_int				eindx,
		fzrt_int				n_div_dir1,
		fzrt_boolean		lock_points

		
);


/****************************************************************

	fz_objt_edit_patch_undivide_object



	Description
		Undivides a Previously divided Patch object. The subdivision is reversed.

	Parameters
		windex  [Input]
			project window index
		src_obj  [Input]
			source object

	Returns
		MODEL_ERR_WRONG_OBJT_TYPE	- object passed in is not a patch


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Utilities/util_objt_patch_udivide.fsl

	See Also
		fz_objt_cnstr_patch_opts_init,fz_objt_cnstr_patch_opts_finit, 
		fz_objt_cnstr_patch_opts_finit,fz_objt_cnstr_patch_opts_get

 ****************************************************************/
	
typedef fzrt_error_td	 (*fz_objt_edit_patch_undivide_object_func)(
	fzrt_int 				windex,
	fz_objt_ptr			src_obj
);



/****************************************************************

	fz_objt_edit_patch_undivide_face



	Description
		Undivides a Previously divided Patch face. The subdivision is reversed.

	Parameters
		windex  [Input]
			project window index
		src_obj  [Input]
			source object
		findx  [Input]
			face  index

	Returns
		MODEL_ERR_WRONG_OBJT_TYPE	- object passed in is not a patch


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Utilities/util_objt_patch_udivide.fsl

	See Also
		fz_objt_cnstr_patch_opts_init,fz_objt_cnstr_patch_opts_finit, 
		fz_objt_cnstr_patch_opts_finit,fz_objt_cnstr_patch_opts_get

 ****************************************************************/
	
typedef fzrt_error_td	 (*fz_objt_edit_patch_undivide_face_func)(
	fzrt_int 				windex,
	fz_objt_ptr			src_obj,
	fzrt_int				findx
);


/****************************************************************

	fz_objt_edit_patch_undivide_segment



	Description
		Undivides a Previously divided Patch segment. The subdivision is reversed

	Parameters
		windex  [Input]
			project window index
		src_obj  [Input]
			source object
		eindx  [Input]
			segment  index

	Returns
		MODEL_ERR_WRONG_OBJT_TYPE	- object passed in is not a patch


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Utilities/util_objt_patch_udivide.fsl

	See Also
		fz_objt_cnstr_patch_opts_init,fz_objt_cnstr_patch_opts_finit, 
		fz_objt_cnstr_patch_opts_finit,fz_objt_cnstr_patch_opts_get

 ****************************************************************/
	
typedef fzrt_error_td	 (*fz_objt_edit_patch_undivide_segment_func)(
	fzrt_int 				windex,
	fz_objt_ptr			src_obj,
	fzrt_int				eindx
);


/****************************************************************

	fz_objt_edit_patch_attach



	Description
		Attaches an open edge of the first patch to an open edge of the second patch. 
		Note that the two required edges, could  belong to the same patch or to different patches. 
		The motion cause by this operation is applied to the first segment based on the movement type indicated 
		(FZ_OBJT_PATCH_ATTACH_MOVE_EDGE,FZ_OBJT_PATCH_ATTACH_MOVE_PATCH,FZ_OBJT_PATCH_ATTACH_MOVE_OBJECT).

	Parameters
		windex  [Input]
			project window index
		src_obj  [Input]
			source object
		dst_obj  [Input]
			destination object
		edge_index1  [Input]
			index of the first edge to be attached
		edge_index2  [Input]
			index of the second edge to be attached
		do_smooth  [Input]
			smooth attachment when value is TRUE
		by_ang  [Input]
			smooth attachment  by angle when TRUE, do_smooth needs to be TRUE
		att_ang  [Input]
			value of angle when by_ang	is TRUE	, 0.0 otherwise
		att_move_type  [Input]
			move edge, move patch or move whole object
		algn_norm  [Input]
			normals of two patches are aligned. only for move patch or move whole object
		scale_patch  [Input]
			first edge is scaled up or down to match length of second edge

	Returns
		MODEL_ERR_WRONG_OBJT_TYPE	- object passed in are not patches


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Utilities/util_objt_patch_attach.fsl

	See Also
		fz_objt_cnstr_patch_opts_init,fz_objt_cnstr_patch_opts_finit, 
		fz_objt_cnstr_patch_opts_finit,fz_objt_cnstr_patch_opts_get

 ****************************************************************/
	

typedef fzrt_error_td	 (*fz_objt_edit_patch_attach_func)(
	fzrt_int 				windex,
	fz_objt_ptr			src_obj,
	fz_objt_ptr			dst_obj,
	fzrt_int				edge_index1,
	fzrt_int				edge_index2,
	fzrt_boolean		do_smooth,
	fzrt_boolean		by_ang,
	double				att_ang	,
	fz_objt_patch_attach_move_type_enum		att_move_type,
	fzrt_boolean		algn_norm,
	fzrt_boolean		scale_patch
	
);

/****************************************************************

	fz_objt_edit_patch_dettach_object



	Description
		This function produces a result that is the reverse of the Attach and Stitch operations. 
		It completely breaks the stitches, exploiting the object. All the patches in the object become separate objects.

	Parameters
		windex  [Input]
			project window index
		src_obj  [Input]
			source object
		ent_list  [Result]
			List of formZ objects created

	Returns
		MODEL_ERR_WRONG_OBJT_TYPE	- object passed in is not a patch


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Utilities/util_objt_patch_dettach.fsl

	See Also
		fz_objt_cnstr_patch_opts_init,fz_objt_cnstr_patch_opts_finit, 
		fz_objt_cnstr_patch_opts_finit,fz_objt_cnstr_patch_opts_get

 ****************************************************************/

typedef fzrt_error_td	 (*fz_objt_edit_patch_dettach_object_func)(
	fzrt_int 				windex,
	fz_objt_ptr			src_obj,
	fz_enty_list_ptr 	ent_list
);

/****************************************************************

	fz_objt_edit_patch_dettach_face



	Description
		This function produces a result that is the reverse of and Attach and Stitch operations. 
		Breaks the stitches of the face which becomes separated.

	Parameters
		windex  [Input]
			project window index
		src_obj  [Input]
			source object
		findx  [Input]
			index of face to be detached
		ent_list  [Result]
			List of formZ objects created

	Returns
		Error codes


	Availability	5.0.0.0


	See Also
		fz_objt_cnstr_patch_opts_init,fz_objt_cnstr_patch_opts_finit, 
		fz_objt_cnstr_patch_opts_finit,fz_objt_cnstr_patch_opts_get

 ****************************************************************/

typedef fzrt_error_td	 (*fz_objt_edit_patch_dettach_face_func)(
	fzrt_int 				windex,
	fz_objt_ptr			src_obj,
	fzrt_int 				findx,
	fz_enty_list_ptr 	ent_list
);

/****************************************************************

	fz_objt_edit_patch_dettach_segment



	Description
		This function produces a result that is the reverse of and Attach and Stitch operations. 
		Breaks the stitches of the edge.

	Parameters
		windex  [Input]
			project window index
		src_obj  [Input]
			source object
		eindx  [Input]
			index of segment to be detached
		ent_list  [Result]
			List of formZ objects created

	Returns
		MODEL_ERR_WRONG_OBJT_TYPE	- object passed in is not a patch


	Availability	5.0.0.0


	See Also
		fz_objt_cnstr_patch_opts_init,fz_objt_cnstr_patch_opts_finit, 
		fz_objt_cnstr_patch_opts_finit,fz_objt_cnstr_patch_opts_get

 ****************************************************************/

typedef fzrt_error_td	 (*fz_objt_edit_patch_dettach_segment_func)(
	fzrt_int 				windex,
	fz_objt_ptr			src_obj,
	fzrt_int 				eindx,
	fz_enty_list_ptr 	ent_list
);


/****************************************************************

	fz_objt_edit_patch_stitch_object



	Description
		This function makes one edge from two edges that were previously unstitched at the object level. 
		Note that for this operation to take effect, the edge must have been previously unstitched.

	Parameters
		windex  [Input]
			project window index
		src_obj  [Input]
			source object
		do_smooth  [Input]
			smooth stitch
		by_angl  [Input]
			smooth stitch	by angle
		angl  [Input]
			angle value

	Returns
		MODEL_ERR_WRONG_OBJT_TYPE	- object passed in is not a patch


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Utilities/util_objt_patch_stitch.fsl

	See Also
		fz_objt_cnstr_patch_opts_init,fz_objt_cnstr_patch_opts_finit, 
		fz_objt_cnstr_patch_opts_finit,fz_objt_cnstr_patch_opts_get

 ****************************************************************/
typedef fzrt_error_td	 (*fz_objt_edit_patch_stitch_object_func)(
	fzrt_int 				windex,
	fz_objt_ptr			src_obj,
	fzrt_boolean		do_smooth,
	fzrt_boolean		by_angl,
	double				angl
);

/****************************************************************

	fz_objt_edit_patch_stitch_face



	Description
		This function makes one edge from two edges that were previously unstitched at the face level. 
		Note that for this operation to take effect, the edge must have been previously unstitched.

	Parameters
		windex  [Input]
			project window index
		src_obj  [Input]
			source object
		findx  [Input]
			face index
		do_smooth  [Input]
			smooth stitch
		by_angl  [Input]
			smooth stitch	by angle
		angl  [Input]
			angle value

	Returns
		MODEL_ERR_WRONG_OBJT_TYPE	- object passed in is not a patch


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Utilities/util_objt_patch_stitch_face.fsl

	See Also
		fz_objt_cnstr_patch_opts_init,fz_objt_cnstr_patch_opts_finit, 
		fz_objt_cnstr_patch_opts_finit,fz_objt_cnstr_patch_opts_get

 ****************************************************************/
typedef fzrt_error_td	 (*fz_objt_edit_patch_stitch_face_func)(
	fzrt_int 				windex,
	fz_objt_ptr			src_obj,
	fzrt_int				findx,
	fzrt_boolean		do_smooth,
	fzrt_boolean		by_angl,
	double				angl
);

/****************************************************************

	fz_objt_edit_patch_stitch_segment



	Description
		This function makes one edge from two edges that were previously unstitched at the segment level. 
		Note that for this operation to take effect, the edge must have been previously unstitched.

	Parameters
		windex  [Input]
			project window index
		src_obj  [Input]
			source object
		sindx  [Input]
			segment index
		do_smooth  [Input]
			smooth stitch
		by_angl  [Input]
			smooth stitch by angle
		angl  [Input]
			angle value

	Returns
		MODEL_ERR_WRONG_OBJT_TYPE	- object passed in is not a patch


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Utilities/util_objt_patch_stitch_segt.fsl

	See Also
		fz_objt_cnstr_patch_opts_init,fz_objt_cnstr_patch_opts_finit, 
		fz_objt_cnstr_patch_opts_finit,fz_objt_cnstr_patch_opts_get

 ****************************************************************/
typedef fzrt_error_td	 (*fz_objt_edit_patch_stitch_segment_func)(
	fzrt_int 				windex,
	fz_objt_ptr			src_obj,
	fzrt_int				sindx,
	fzrt_boolean		do_smooth,
	fzrt_boolean		by_angl,
	double				angl
);


/****************************************************************

	fz_objt_edit_patch_unstitch_object



	Description
		This function is a partial detachment. It breaks the stitches of all the edges of the object, 
		but preserves the coincidence of the control points at their ends

	Parameters
		windex  [Input]
			project window index
		src_obj  [Input]
			source object

	Returns
		MODEL_ERR_WRONG_OBJT_TYPE	- object passed in is not a patch


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Utilities/util_objt_patch_stitch.fsl
		../../../../Scripts/Samples/Utilities/util_objt_patch_unstitch.fsl

	See Also
		fz_objt_cnstr_patch_opts_init,fz_objt_cnstr_patch_opts_finit, 
		fz_objt_cnstr_patch_opts_finit,fz_objt_cnstr_patch_opts_get

 ****************************************************************/

typedef fzrt_error_td	 (*fz_objt_edit_patch_unstitch_object_func)(
	fzrt_int 				windex,
	fz_objt_ptr			src_obj
);

/****************************************************************

	fz_objt_edit_patch_unstitch_face



	Description
		This function is a partial detachment. It breaks the stitches of all the edges of the face, 
		but preserves the coincidence of the control points at their ends

	Parameters
		windex  [Input]
			project window index
		src_obj  [Input]
			source object
		findx  [Input]
			face index

	Returns
		MODEL_ERR_WRONG_OBJT_TYPE	- object passed in is not a patch


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Utilities/util_objt_patch_stitch_face.fsl

	See Also
		fz_objt_cnstr_patch_opts_init,fz_objt_cnstr_patch_opts_finit, 
		fz_objt_cnstr_patch_opts_finit,fz_objt_cnstr_patch_opts_get

 ****************************************************************/

typedef fzrt_error_td	 (*fz_objt_edit_patch_unstitch_face_func)(
	fzrt_int 				windex,
	fz_objt_ptr			src_obj,
	fzrt_int 				findx
);

/****************************************************************

	fz_objt_edit_patch_unstitch_segment



	Description
		This function is a partial detachment. It breaks the stitches of the edge 
		but preserves the coincidence of the control points at their ends

	Parameters
		windex  [Input]
			project window index
		src_obj  [Input]
			source object
		eindx  [Input]
			segment index

	Returns
		MODEL_ERR_WRONG_OBJT_TYPE	- object passed in is not a patch


	Availability	5.0.0.0

	Example Files
		../../../../Scripts/Samples/Utilities/util_objt_patch_stitch_segt.fsl

	See Also
		fz_objt_cnstr_patch_opts_init,fz_objt_cnstr_patch_opts_finit, 
		fz_objt_cnstr_patch_opts_finit,fz_objt_cnstr_patch_opts_get

 ****************************************************************/
typedef fzrt_error_td	 (*fz_objt_edit_patch_unstitch_segment_func)(
	fzrt_int 				windex,
	fz_objt_ptr			src_obj,
	fzrt_int 				eindx
);


/****************************************************************

	fz_objt_edit_patch_merge



	Description
		This function merges two patches into one patch, the second patch is merged to the first patch.

	Parameters
		windex  [Input]
			project window index
		fst_obj  [Input]
			first source object
		scnd_obj  [Input]
			second source object
		sindx1  [Input]
			segment index	 of the first object
		sindx2  [Input]
			segment index	 of the second object
		do_smooth  [Input]
			smooth stitch
		by_angl  [Input]
			smooth stitch	by angle
		angl  [Input]
			angle value
		smth_int  [Input]
			type of smoothing

	Returns
		MODEL_ERR_WRONG_OBJT_TYPE	- object passed in are not patches


	Availability	5.0.0.0


	See Also
		fz_objt_cnstr_patch_opts_init,fz_objt_cnstr_patch_opts_finit, 
		fz_objt_cnstr_patch_opts_finit,fz_objt_cnstr_patch_opts_get

 ****************************************************************/

typedef fzrt_error_td	 (*fz_objt_edit_patch_merge_func)(
	fzrt_int 				windex,
	fz_objt_ptr			fst_obj,
	fz_objt_ptr			scnd_obj,
	fzrt_int				sindx1,
	fzrt_int				sindx2,
	fzrt_boolean		do_smooth,
	fzrt_boolean		by_angl,
	double				angl,
	fzrt_boolean		smth_int
);

#ifdef __cplusplus
}
#endif

#endif
