import jsdai.SMachining_schema.*;
import jsdai.SMilling_schema.*;
import jsdai.SMilling_tool_schema.*;
import jsdai.STurning_schema.*;
import jsdai.STurning_machine_tool_schema.*;
import jsdai.dictionary.EBoolean_type;
import jsdai.lang.*;

public class Simples_Torneamento {
	
	public static void main(String[] args) throws SdaiException
	{
		//Inicio arquivo.
		SdaiSession session = SdaiSession.openSession();
		session.startTransactionReadWriteAccess();
		SdaiRepository repository = session.createRepository("", null);
		repository.openRepository();
		SdaiModel model = repository.createSdaiModel("DemoSTEP_NC", SMachining_schema.class);
		model.startReadWriteAccess();
		
		
		//Workpiece definition
		
		EWorkpiece workpiece = (EWorkpiece)model.createEntityInstance(EWorkpiece.class);
		workpiece.setIts_id(null, "SIMPLE WORKPIECE");
		
		EMaterial material = (EMaterial)model.createEntityInstance(EMaterial.class);
		material.setMaterial_identifier(null, "E 295");
		material.setStandard_identifier(null, "DIN EN 10027-1");
		
		ENumeric_parameter numeric_parameter = (ENumeric_parameter)model.createEntityInstance(ENumeric_parameter.class);
		numeric_parameter.setIts_parameter_unit(null, "pa");
		numeric_parameter.setIts_parameter_value(null, 2.E11);
		
		//Manufacturing features
		
		ERevolved_flat revolved_flat = (ERevolved_flat)model.createEntityInstance(ERevolved_flat.class);
		//revolved_flat.
		
		//Final arquivo
		repository.exportClearTextEncoding("STEP-NC File (Simples_Torneamento).p21");
		session.closeSession();		
		System.out.println("====== .DONE. ======");
	}
}