#include "ProxyHeaders.hpp"

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
Process::Process():
	planeThicknessTolerance(1e-4f),
	duplicateVertexTolerance(1e-4f),
	colinearTolerance(1e-4f),
	continueProcess(true),
	suppress(true),
	errorfn(NULL)
{
}

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//
Process::Process(NotationFile *data_file,bool bSuppress,void* fcn):
	suppress(bSuppress),
	errorfn(fcn),
	continueProcess(true)
{
	if (data_file)
	{
		Check_Object(data_file);
		
		planeThicknessTolerance = 1e-4f;
		duplicateVertexTolerance = 1e-4f;
		colinearTolerance = 1e-4f;
		
		Page *page = data_file->FindPage("Process");
		if (page)
		{
			Check_Object(page);
			page->GetEntry("PlaneThickness", &planeThicknessTolerance);
			page->GetEntry("DuplicateVertex", &duplicateVertexTolerance);
			page->GetEntry("Colinear", &colinearTolerance);
		}
	}
}
