/*********************************************************************************************
 *                                                                                           *
 *                                                                                           *
 *   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_ACIS_API_H
#define __FORMZ_ACIS_API_H 1


#include "fzpl_plugin.h"
#include "fz_objt_api.h"

#ifdef __cplusplus
extern "C" {
#endif



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

	fz_acis_ent_ptr


	Description
		Data structure that contains a pointer to an ACIS entity corresponding to a Smooth Object in formZ.

	Availability	5.0.0.0


	See Also
		fz_acis_cnstr_objt

 ****************************************************************/
typedef void	*fz_acis_ent_ptr;

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

	fz_acis_read



	Description
		Reads an SAT file and creates formZ objects. 
		If form_solids is TRUE, an attempt is made to stitch surfaces to form solid objects. 
		If do_heal is TRUE, an attempt is made to correct any corrupt geometry encountered.

	Parameters
		windex  [Input]
			project window index
		floc  [Input]
			SAT File information
		form_solids  [Input]
			Form solids
		do_heal  [Input]
			Heal corrupt geometry
		ent_list  [Result]
			List of formZ objects created

	Returns
		Error codes


	Availability	5.0.0.0


	See Also
		fz_acis_write,fz_objt_get_acis_entity,fz_acis_cnstr_objt

 ****************************************************************/
typedef fzrt_error_td	 (*fz_acis_read_func)(
	fzrt_int				windex,
	fzrt_floc_ptr 		floc,
	fzrt_boolean		form_solids,
	fzrt_boolean		do_heal,
	fz_enty_list_ptr	ent_list
	);
	
/****************************************************************

	fz_acis_write



	Description
		Writes an SAT file from the input formZ objects. 
		If mode is TRUE, the output file is text else binary.

	Parameters
		windex  [Input]
			project window index
		ent_list  [Input]
			List of formZ objects
		floc  [Input]
			File information
		mode  [Input]
			TRUE=Text, FALSE=Binary

	Returns
		Error codes


	Availability	5.0.0.0


	See Also
		fz_acis_read,fz_objt_get_acis_entity,fz_acis_cnstr_objt

 ****************************************************************/
typedef fzrt_error_td	 (*fz_acis_write_func)(
	fzrt_int				windex,
	fz_enty_list_ptr ent_list,
	fzrt_floc_ptr	floc,
	fzrt_boolean	mode
	);

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

	fz_acis_cnstr_objt



	Description
		Creates a formZ object from an ACIS entity. 
		The ACIS entity must be of topology type BODY.

	Parameters
		windex  [Input]
			project window index
		ent  [Input]
			ACIS entity
		obj  [Result]
			New Object

	Returns
		Error codes


	Availability	5.0.0.0


	See Also
		fz_acis_write,fz_acis_read,fz_objt_get_acis_entity

 ****************************************************************/
typedef fzrt_error_td	 (*fz_acis_cnstr_objt_func)(
	fzrt_int				windex,
	fz_acis_ent_ptr	ent,
	fz_objt_ptr	*obj
	);

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

	fz_objt_get_acis_entity



	Description
		Retrieves ACIS entity from a formZ object. 
		The ACIS entity is of topology type BODY.

	Parameters
		obj  [Input]
			formZ objects
		ent  [Result]
			ACIS entity

	Returns
		Error codes


	Availability	5.0.0.0


	See Also
		fz_acis_write,fz_acis_read,fz_acis_cnstr_objt

 ****************************************************************/
typedef fzrt_error_td	 (*fz_objt_get_acis_entity_func)(
	fz_objt_ptr	obj,
	fz_acis_ent_ptr 	*ent
	);


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

	fz_acis_fset


	FZ_ACIS_FSET_TYPE
		formZ ACIS function set UUID.

	FZ_ACIS_FSET_NAME
		formZ ACIS function set name.

	FZ_ACIS_FSET_VERSION
		formZ ACIS function set version.

	Description
		formZ ACIS Function Set

	Availability	5.0.0.0

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


#define FZ_ACIS_FSET_TYPE		"\xc2\x6a\xa0\x05\x04\xac\x4f\x8a\xb1\xe8\xb4\x16\x30\x83\x35\x6e"
#define FZ_ACIS_FSET_NAME		"formZ ACIS interface functions"
#define FZ_ACIS_FSET_VERSION	FZPL_VERS_MAKE(5,0,0,0)

typedef struct
{
	fzpl_fset_prvt_data_td				prvt_data;

	fz_acis_read_func						fz_acis_read;
	fz_acis_write_func						fz_acis_write;
	fz_acis_cnstr_objt_func				fz_acis_cnstr_objt;
	fz_objt_get_acis_entity_func			fz_objt_get_acis_entity;
	
	
	
}  fz_acis_fset;


#ifdef __cplusplus
}
#endif

#endif
