-----------------------------------------------------------------------
--
-- Copyright (c) 2012 VINAS
-- All rights reserved.
--
-- This sample FVX script is not supported by VINAS and VINAS provides
-- no warranties or assurances about its fitness or merchantability.
-- It is provided at no cost and is for demonstration purposes only.
--
--
--                           FAQ_FF064_CreateBndSurf_for_every_BC_02.fvx
--                                      created on  Tue. Jan. 10, 2012
-----------------------------------------------------------------------


	---- preparing input dataset 
	data_input_table = {
		data_format = "unstructured",
		input_parameters = {
				name = "./FF064_sample.uns",
				options = {
					input_mode = "replace",
					transient = "off"
				},
		}
	}

	---- read dataset
	print("-------- read dataset ------------")
	DatasetHandle= read_dataset(data_input_table)


	---- create boundary table
	boundary_tableA = {
		dataset = 1,
		geometric_color = 4,
		visibility = "off",
		scalar_func = "p",
		display_type = "smooth_shading",
	}
	boundA=create_boundary(boundary_tableA)



	---- Extract all boundary types
	Btype={}
	Btype=get_all_boundary_types(1, boundA)
	print(getn(Btype))



	BndTable={}
	BndHandle={}

	---- main loop
	for i=1, getn(Btype) do


		print("now creating: '"..Btype[i].."' boundary surface ")

		BndTable[i]={}
		BndHandle[i]={}
		BndTypeList={}

		BndTypeList[1]=Btype[i]

		---- create boundary table
		BndTable[i] = {
			dataset = 1,
			geometric_color = 4,
			visibility = "on",
			scalar_func = "p",
			display_type = "smooth_shading",
			types = BndTypeList,
		}

		BndHandle=create_boundary(BndTable[i])


	end 


